how to read Command Line Arguments from VB program

How to read Command Line Arguments from VB program.

what are the commands in VB.

in C we reads the arguments like that


main(int argc, *argv[])

david2001Asked:
Who is Participating?
 
khanateConnect With a Mentor Commented:
All "command line" input is stored in the command$ variable.  To work with it I usally but something in the form_load() sub, like

private sub form_load()
 if lcase($command) = "autostart" then
   call cmdStart_click
 endif
endsub

The nice thing about command$ is that it can be given either from the DOS box or from another program's shell() function.  Example:

private sub cmdStartOtherProgram_click()
 shell("c:\compiled_projects\other_project.exe autostart")
endsub
0
All Courses

From novice to tech pro — start learning today.