Jump to content

VB6.0:Tutorial, Command Line

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
11 replies to this topic

#1
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
Introduction:-
Well welcome to another Tutorial, Here I will tell you how to make command lines in Visual Basic. This is a good thing and I find it pretty useful including command lines in my programs!

Solution:-
I will use this to simply change the background colour of the form but you can practically use it to meka everything! For example I made a program for myself and I used the command line to open specific application at a specific time and writing logs! so you can do everything you want!

The Code:-

Private Sub Form_Load()
If Command = "Black" Then Form1.BackColor = vbBlack
If Command = "White" Then Form1.BackColor = vbWhite
End Sub
Thats it!
Explanation:-

If Command = "Black" Then Form1.BackColor = vbBlack
If the Command line is "Black" then make the background of the form black!

Running/Testing the code:-
Ok so for this to work you need to:-
1.) Compile the program ( Create its EXE file )
2.) Create a Shortcut of the EXE
3.) Insert the command line

How to insert the command line?:-
Right-Click the shortcut
go on properties
Now go on the Target text box and after the file location write the command line

Here are some snapshots to help you:-
How to add the command line

Posted Image
and this is the preview

Posted Image

Conclusion:-
As Always Feedback is welcome and the full source is attached!! ( although its not so needed )

Attached Files



#2
Guest_Jordan_*

Guest_Jordan_*
  • Guests
Nice tutorial! Thanks!

#3
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
You are more than welcome! Thanks for your feedback!

#4
xXHalfSliceXx

xXHalfSliceXx

    Speaks fluent binary

  • Moderators
  • 1,694 posts
You are always good to the newbies!

Posted Image
Posted Image


#5
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts

xXHalfSliceXx said:

You are always good to the newbies!
Thanks, coz thats how, in my opinion, tutorials should be! because its useless making complicated tutorials that newbies will not understand! because actually tutorials ARE for newbies. Right?

#6
Guest_samoh77_*

Guest_samoh77_*
  • Guests
Good tutorial. Thanks.

#7
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
Glad it helped :D

#8
Ollox360

Ollox360

    Newbie

  • Members
  • PipPip
  • 18 posts
pretty good, i have been looking for some "extra shortcut command lines"

#9
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
I think it would be better to use a Select Case instead of multiple Ifs. Even for newbies. :)
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#10
Healncrush

Healncrush

    Newbie

  • Members
  • PipPip
  • 12 posts
Awesome, Thanks!

#11
AcroneShadow

AcroneShadow

    Newbie

  • Members
  • PipPip
  • 16 posts
thanks for the info. Good Luck:)

#12
Zizooooo

Zizooooo

    Newbie

  • Members
  • PipPip
  • 15 posts
Very good but can u give more examples??