Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Activate an application within all windows application
Message
From
22/11/2005 14:53:28
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Oracle
Miscellaneous
Thread ID:
01071271
Message ID:
01071286
Views:
15
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform