Click to See Complete Forum and Search --> : Command line options w/ VB program


Aaron
November 29th, 1999, 10:04 AM
Does anyone know how to make it so you can add command line options to a VB Program.. Like If I want a feature disabled by default but I can enable it if I Run the program with a switch or something.. Like Notepad -Y ... or someting to that effect..

Thanks

Lothar Haensler
November 29th, 1999, 10:53 AM
in your VB program check the Command$ variable. It is a global variable that contains the command line arguments of your program.

Chris Eastwood
November 29th, 1999, 05:09 PM
There's some handy code at :

http://codeguru.developer.com/vb/articles/1755.shtml that split your command line parameters (from Command$ as Lothar stated) into an array for you - you can simply drop it into your program.


Chris Eastwood

CodeGuru - the website for developers
http://codeguru.developer.com/vb