PROCEDURE BringAppToTop LPARAMETERS tcAppName *** Brings the app to the top and give it focus in Windows 2000 DECLARE INTEGER FindWindow IN Win32API STRING, STRING DECLARE SHORT SetWindowPos IN USER32 ; INTEGER hWnd, ; INTEGER hWndInsertAfter, ; INTEGER x, ; INTEGER y, ; INTEGER cx, ; INTEGER cy, ; INTEGER uFlags #DEFINE HWND_TOPMOST_WINDOW -1 #DEFINE SWP_NOMOVE 2 #DEFINE SWP_NOSIZE 1 #DEFINE SWP_SHOWWINDOW 0x40 #DEFINE SWP_BRINGTOTOP SWP_NOSIZE + SWP_NOMOVE + SWP_SHOWWINDOW hWnd = FindWindow(0, tcAppName) =SetWindowPos(hWnd, HWND_TOPMOST_WINDOW, 0,0,0,0, SWP_BRINGTOTOP) _SCREEN.AlwaysOnTop = .T. _SCREEN.AutoCenter = .T. _SCREEN.Visible = .T. _SCREEN.Show() _SCREEN.AlwaysOnTop = .F. RETURNCall it with this code.
*** Bring app to top in Windows 2000 BringAppToTop(_SCREEN.Caption)Hope this works for you.