i have a program that uses command line args what i would like to do is if another instance is started that it tells the first what args it was sent and then closes. how can i do this
Printable View
i have a program that uses command line args what i would like to do is if another instance is started that it tells the first what args it was sent and then closes. how can i do this
You can check the previous instance by
If App.PrevInstance Then
.......
End If
But to pass arguments to an exe.. :( i don't know..
The "Command$" variable stores the all the command line arguments. e.g.
Code:'Add to Load() event
MsgBox Command$
It is not as simple as that/ You are both correct with what you have posted, but it is slightly more complicated to pass parameters to the other app. I think if you create an ActiveX EXE standalone application then you could get one to talk to the other by using a common module and passing a string to the main app, which you have to save in a collection...does that make sense?