*********************************************** * only start system if it is not already running *********************************************** SET LIBRARY TO "foxtools.fll" ADDITIVE GetWind = RegFn("FindWindow", "CC", "I") * Set the first parameter of the call to getwind to 0, null. wclass = 0 winname = sgcAppTitle apphand = CallFn(GetWind,wclass ,winname) * If the call was successful, stop processing. lContinue = .T. IF apphand <> 0 WAIT WINDOW "This program is already running. Check your task bar or press ALT+TAB to activate the program." TIMEOUT 10 QUIT ELSE *run your code here* ENDIF