Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get app name for window
Message
From
24/10/2002 09:21:37
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00714763
Message ID:
00714793
Views:
18
>when starting our application, we use the findwindow api call to determine if the application is already running and if a handle is found, we use setforegroundwindow to focus on that window rather than starting another copy of the application. Our problem is that since the application name matches the folder name in which the executables are stored, we cannot start the application from windows explorer because the window name for windows explorer is the folder name. we are trying to determine what api functions we can use to determing the application that an open window is associated with. if anyone can help, we would appreciate it.

Provide the 'class' parameter of FindWindow. Also yo could use GetClassName to get class from hwnd :

cClass =space(200)
lnBufLen = GetClassName(iHWND, @cClass, 200)
IF UPPER(LEFT(cClass,lnBufLen))='VFP'
...

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