Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get app name for window
Message
De
24/10/2002 09:21:37
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00714763
Message ID:
00714793
Vues:
19
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform