Results 1 to 3 of 3

Thread: Command Line Arguments, How To?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2000
    Location
    US
    Posts
    20

    Post

    I just want to know how to be able to take in a small argument like the OLD msdos utils (copy, fdisk, ...) like so:

    MyVBapp.exe Hello1

    Any Help?

    Andy

  2. #2
    New Member
    Join Date
    Aug 1999
    Posts
    15

    Post

    I always do it in the form load part:
    Do something like this:

    Code:
    dim cmd$
    
    cmd$ = command
    'command is whatever argument you give
    
    if cmd$ = "Hello1" then
      'do what you need, like:
      txt1.text = "Hello1"
    else
      'do default for no cmd argument
      txt1.text = "No argument entered"
    
    endif


    [This message has been edited by TheMadMonk (edited 02-20-2000).]

  3. #3
    New Member
    Join Date
    Aug 1999
    Posts
    15

    Post

    Oh, and you can test it out from in VB by doing this: (in VB5)

    Click Project... Project1 Properties... Make...Command Line Arguments (enter the parameter to test/use here)

Posting Permissions

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



Click Here to Expand Forum to Full Width