Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Another app instance question
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00628296
Message ID:
00628362
Views:
15
>>I need to know how many instances of an application are running. The main window title for the application might or might not be different among the running instances, so I cannot use findwindow. What I would really like to be able to do is sniff the system's task list... as I need something that would perform the equivalent of (if it existed) an ATasks() function. Each row would contain info about a running task, and the columns would contain things like the EXE name, the PID, the length of time it has been running, etc. Any suggestions? Thanks very much.
>>
>>P.S. Maybe instead of ATasks(), I could use ATasker() function call. :-) George?
>
>ROFL!
>
>Each running application has a window associated with it. It's a relatively simple matter to iterate through the top level windows, retrieve the title bar text and compare it for possible matches. My Is_Run32 program (in the download section) does this to retrieve the window handle based on the known portion of the title bar text. Besides that, you might also want to look at my SpyFoxFox (also in the download section). This retrieves the window handle, title text and class name of all open windows including children.
>
>The problem with trying to retrieve windows based on their class is that while many applications retain the class name from version to version (VB - Thunderform, Word - OpusApp) others do not. VFP is an example of the latter.

But what if I have a compiled VFP app called MyApp.EXE? I just need to ask the OS how many instances of it are running.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform