*!*See if Calculator is running, and if so, close it DECLARE INTEGER ShowWindow IN win32api INTEGER,INTEGER DECLARE INTEGER BringWindowToTop IN Win32API INTEGER hWnd *!* To see if Outlook is running *lnHand =IsRunning("Outlook") *!* To see if Calculator is running lnHand=CheckWin("Calculator") #DEFINE WM_QUIT 0x12 DECLARE SHORT PostMessage In USER32.DLL ; INTEGER hWnd, ; INTEGER uMsg, ; INTEGER wParam, ; INTEGER lParam IF lnHand>0 =PostMessage(lnHand,WM_QUIT,0,0) ENDIF RETURN PROCEDURE CheckWin PARAMETER tcTitle * Routine which sees if an application is active by looking for its * Window title * expC1 Window title DECLARE INTEGER FindWindow in Win32API as FindWindow STRING, STRING lnhand=FindWindow(0,tcTitle) *!*Display the window handle to the screen ? lnhand *!*To return the window handle: RETURN lnhand *!*To return .t. or .f. it is open: *RETURN IIF(FindWindow(0,tcTitle)>0,.T.,.F.)Tracy