Page 1 of 1

Get option at command line

Posted: Mon Jan 09, 2012 3:14 pm
by PBogger
I would like to know if it is possible to get an option given at the command line for a GUI program. For example i would like to load different images depending on what the user provides when the executable is run. If

Code: Select all

myapp.exe bw
is given i want to load the images in Data/bw And if

Code: Select all

myapp.exe retro
is given i want to load the images in Data/retro. Any assistance would be greatly appreciated.

Sincerely,

PBogger

Re: Get option at command line

Posted: Mon Jan 09, 2012 3:28 pm
by infratec
Hi,

and welcome PBogger :!:

Code: Select all

For i = 0 To CountProgramParameters() - 1
  Debug ProgramParameter(i)
Next i
Doesn't matter if it is a console or GUI program.

Bernd