Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to tell if another Windows app is running?
Message
 
À
10/05/1999 12:46:37
Paul De Niverville
Deniverville Econometric Research Ltd.
Victoria, Colombie Britannique, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00215085
Message ID:
00216772
Vues:
24
>>Another problem with FindWindow is that you have to supply the complete text of the title bar. You might want to look at might Is_Run32 function (available from the download section under Win32 & other APIs). It'll return the window handle based on the known portion of the title bar (and isn't case sensitive).
>>
>>hth,
>
>Hi George,
>
>Is there a win32api that I can use to change the active window? This is a followup to the problem I was having about requiring a fax monitor running as part of my VFP app. I can now find out if the fax monitor is running. If it isn't running, I can start it using 'run /n7 faxmon32.exe'. However the focus remains on the fax monitor. I would like the focus to return to my VFP APP. Any ideas?
>
>Thanks for your note on Is_run/Is_Run32. I read the readme.txt. It looks more useful than FindWindow.
>
Hi Paul,

Thanks for the kind words.

To activate another application and its window use the following:
DELCARE SHORT SetForegroundWindow IN Win32API;
  INTEGER hWnd
* lnhWnd is the Window handle of the application to activate
llresult = (SetForegroundWindow(lnhWnd) # 0)
IF llresult
  * The app was activated.
ENDIF
The value returned by Is_Run32 can be passed to SetForegroundWindow.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform