PARAMETER winname PRIVATE pnlibrary, pcmessage pnlibrary = SET("LIBRARY") SET LIBRARY TO gcroot+"\FOXTOOLS.fll" * FindWindow() takes two parameters and returns the handle of the window, HWND, if it was found. GetWind = RegFn("FindWindow", "CC", "I") wclass=0 &&Set the first parameter of the call to getwind to 0, null. apphand=CallFn(GetWind,wclass ,winname) IF apphand<>0 && If the call was successful, stop processing. pcmessage = ALLTRIM(g_appname) + CHR(13) + " Is already running on this computer!" WAIT WINDOW TIMEOUT 10 pcmessage *deal with an exit here ENDIF SET LIBRARY TO &pnlibraryTommy