The running foxpro app is not the active task in the windows task bar  
Author Message
Aleniko29139





PostPosted: Visual FoxPro General, The running foxpro app is not the active task in the windows task bar Top

Hi;

I have installed a VFP9 exe file on a 2003server network.

I have noticed that when the app is run, it doesn't become the active task in the windows task bar. This causes some confusion with the users.

How would I make it the active task

Thx.


Visual FoxPro2  
 
 
Alex Feldstein





PostPosted: Visual FoxPro General, The running foxpro app is not the active task in the windows task bar Top

This is a tip from the late Ed Rauh [MVP]:

* In your program's initial setup routine

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


 
 
Aleniko





PostPosted: Visual FoxPro General, The running foxpro app is not the active task in the windows task bar Top

This is a tip from the late Ed Rauh [MVP]:

* In your program's initial setup routine

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



Alex;
I have put the code above in the initial setup of the program. DOEVENTS() can't be used using parentheses (See VFP doc), so I have removed the parentheses. Didn't do much.

Any ideas

Thanks.