Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Activate an application within all windows application
Message
De
22/11/2005 14:53:28
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Oracle
Divers
Thread ID:
01071271
Message ID:
01071286
Vues:
17
>Hi Friends,
>
>Need to activate a VFP application from all the windows of other applications.
>
>Example:
>
>If a guy is playing DOOM game(or any other high graphics game) and We wish to interupt him by poping a form saying he has to logout or he has to recharge his account for continous playing. The problem is to activate my application from all the other application running.
>
>Any ideas?

there is a code that we use to bring our app to the top

****************************************************************************
* VNS * 12/02/02 Try to bring TMG window to the top of other apps
****************************************************************************
DECLARE INTEGER GetActiveWindow IN WIN32API
DECLARE INTEGER GetForegroundWindow IN WIN32API
DECLARE INTEGER SetForegroundWindow IN WIN32API INTEGER hWnd
PRIVATE nMyAppMainHwnd
_Screen.Visible = .T.
DOEVENTS
nMyAppMainHwnd = GetForegroundWindow() && your app has focus at this time
* When you want the VFP instance to pop to the top:
=SetForegroundWindow(nMyAppMainHwnd)

HTH
* Human is a question asked by birth and answered by death. Machine is another kind of question with another kind of answer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform