Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running a secondary VFP background application
Message
From
21/08/2001 06:31:27
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00546282
Message ID:
00546620
Views:
11
>>>I have a small secondary VFP application, (performs basic housekeeping), I want to run from a primary application with control immediately returning to the primary application after launching the secondary VFP application.
>>>
>>>The secondary application simply shuts down on completion.
>>>
>>>What's the best approach please?
>>>
>>>Dennis
>>
>>Dennis,
>>Use ShellExecute. That way each app you launch would run independetly as if they're launched separately.
>
>Actually, < shameless self-promotion > I'd recommend using API_APPRUN to do this < /shameless self-promotion >; it returns an hProcess which will allow you to modify the priority of execution and allows you to check on the completion state of the launched application. API_APPRUN can be downloaded from the Files Section.

Ed,
I'd do too :) However do you remember my question about it. It doesn't work well with multiple launches of some applications (ie:word). It returns immediately when another instance launched. As I remember it was using waitforsingleobject but not waiting. It's word's fault IMHO for it spawns all instances under the same pid. I created a .fll just for that. My fll is no superior to API_Apprun, just different it has enumerating of windows and checking completion explicitly with hWnd+caption (again a word thing. when an instance is exited (first one and there are others) hWnd stays there just setting the caption to 'nothing').
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform