>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