Click to See Complete Forum and Search --> : command line parameter in VB


nilch
December 23rd, 1999, 12:13 AM
I want to execute a VB app and pass parameters to it. How do I do this in VB ?
How is a parameterised app created in VB ?

What I want to do is -
>> start application.exe param1, param2

from the dos shell.

Thanx in advance

Dr_Michael
December 23rd, 1999, 02:47 AM
dim str as string

Form_Load()
str=Command
end sub


Command1_Click()
Select case Trim(str)
case is ""
'do nothing
case is "1"
'do something
case is "2"
'do something else
end select
end sub



If you add a command button on your form, you can there check which action will be taken regarding to the command parameter that was passed...
I made the check on the pressing of the button, you can do it whenever you need or even on the load event of your form....

Michael Vlastos
Automation Engineer
Company SouthGate Hellas SA
Development Department
Athens, Greece