+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 10 of 12

Thread: VB6.0:Tutorial, Command Line

  1. #1
    TcM
    TcM is offline
    Code Warrior TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM's Avatar
    Join Date
    Aug 2006
    Posts
    11,461
    Blog Entries
    6

    VB6.0:Tutorial, Command Line

    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:-

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

    Code:
    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


    and this is the preview



    Conclusion:-
    As Always Feedback is welcome and the full source is attached!! ( although its not so needed )
    Attached Files
    Last edited by TcM; 11-22-2006 at 01:34 PM.

  2. #2
    Administrator Jordan is a name known to all Jordan is a name known to all Jordan is a name known to all Jordan is a name known to all Jordan is a name known to all Jordan is a name known to all Jordan's Avatar
    Join Date
    Nov 2005
    Location
    Hendersonville, NC
    Posts
    24,556
    Blog Entries
    97
    Nice tutorial! Thanks!

  3. #3
    TcM
    TcM is offline
    Code Warrior TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM's Avatar
    Join Date
    Aug 2006
    Posts
    11,461
    Blog Entries
    6
    You are more than welcome! Thanks for your feedback!

  4. #4
    Co-Administrator xXHalfSliceXx is an unknown quantity at this point xXHalfSliceXx's Avatar
    Join Date
    Oct 2006
    Location
    Hendersonville, NC
    Age
    26
    Posts
    1,805
    Blog Entries
    3
    You are always good to the newbies!


  5. #5
    TcM
    TcM is offline
    Code Warrior TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM's Avatar
    Join Date
    Aug 2006
    Posts
    11,461
    Blog Entries
    6
    Quote Originally Posted by xXHalfSliceXx View Post
    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. #6
    Newbie samoh77 is an unknown quantity at this point
    Join Date
    Jan 2007
    Posts
    1
    Good tutorial. Thanks.

  7. #7
    TcM
    TcM is offline
    Code Warrior TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM's Avatar
    Join Date
    Aug 2006
    Posts
    11,461
    Blog Entries
    6
    Glad it helped

  8. #8
    Newbie Ollox360 is an unknown quantity at this point
    Join Date
    Jun 2008
    Posts
    18

    Re: VB6.0:Tutorial, Command Line

    pretty good, i have been looking for some "extra shortcut command lines"

  9. #9
    Xav
    Xav is offline
    Code Slinger Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav's Avatar
    Join Date
    Mar 2008
    Location
    The North Pole
    Posts
    13,210
    Blog Entries
    13

    Re: VB6.0:Tutorial, Command Line

    I think it would be better to use a Select Case instead of multiple Ifs. Even for newbies.

    Quote Originally Posted by Jordan View Post
    Good members, like yourself, stick around and post for ages to come!
    Mr. Xav | Blog | Forums

  10. #10
    Newbie Healncrush is an unknown quantity at this point Healncrush's Avatar
    Join Date
    Aug 2008
    Posts
    12

    Re: VB6.0:Tutorial, Command Line

    Awesome, Thanks!

+ Reply to Thread
Page 1 of 2
1 2 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. VB6.0:Tutorial, WipeFile
    By TcM in forum VB Tutorials
    Replies: 10
    Last Post: 07-26-2009, 12:54 PM
  2. VB6.0:Tutorial, Error handling
    By TcM in forum VB Tutorials
    Replies: 11
    Last Post: 12-22-2008, 10:03 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts