Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determine if a non fox program is already running
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01381705
Message ID:
01381738
Views:
41
> I use code to find out if a 3rd party program is running which works fine normally.
> Lately the makers have placed a constantly changing form caption which throws my code off.

1) API function FindWindow requires two parameters. The first one is the class name. May be that 3rd application main window has very specific class name that no other application uses.

Then you can call the FindWindow looking for this class name. The second parameter (the window's title) in this case is irrelevant and should be set to either NULL, 0 or empty string depending on how the function is declared in your code.

Run Spy++ utility (MS Visual Studio) or similar to find out what the class name for the main window of the 3rd party app.

http://msdn.microsoft.com/en-us/library/ms633499.aspx

2) If the name of the 3rd party executable is known a good option is enumerating running processes and finding out if a process created from the executable exists.

Enumerating Processes -- WinNT
http://news2news.com/vfp/?example=162
Previous
Reply
Map
View

Click here to load this message in the networking platform