Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Shellexecute and parameters
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00710928
Message ID:
00710951
Views:
9
>>I have the need to call another VFP EXE from within a program. Presently we check to see if the EXE is running. If not, then use the SHELLEXECUTE to pass parameters and run the EXE.
>>If it is running, the EXE is brought to the front in a normalized state. Question I have is how can I best pass a new parameter to the EXE when it is already running?
>
>Hi Ronald
>VFP Exes get their "command arguments" only on enter (as parameters of the main procedure, or the init event on the startup form). So there's no such thing as "pass a new parameter while running"... unless you use DDE (yeah, the old "obsolet" protocol) setting your running app as "DDE server". If you wish to do so take a look at the DDExxxxx functions.
>
>Maybe it would be better to implement a COM component in VFP7, and call it with CREATEOBJECT.. or communicate with messages (MSMQ or file based) between your VFP applications.
>
>HTH and bye
>Jose.

Thanks for the reply. Let me ask, if the second program is still running, is there a way to find out if it has the focus after I issue the 'bring to front'? What I am attempting to do is have the user fire the second program, go back to the first and continue. Then when the go back to the other application, I would like to beable to trap at that point. I have tried to check in the Activate, Show, and Got focus, but can not get response unless I have the user do some activity on a form of the secondary program.
Previous
Reply
Map
View

Click here to load this message in the networking platform