>I have a one form VB 6 application that is an image viewer. I need to run the .exe from another application and pass parameters from the calling program to my app.
>How can I do this?
>I currently can fire the app off using the following commands:
> MyAppID = Shell(filepath, 1) 'filepath is the path to the .exe file
> AppActivate MyAppID
>but this does not allow me to pass any variables.
>
>Any ideas would be greatly appreciated.
You can call your app using a parameter similar to this:
shell "notepad.exe test.txt"
From your VB app, use the COMMAND statement that will give you the parameter passed:
msgbox COMMAND
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com