* -- NSL 6/6/01 Check to see if there are other copies of JC instanciated *-------------------------------------------------------------------------- PRIVATE lcLibrary,GetWind lcLibrary=SET('LIBRARY') SET LIBRARY TO sys(2004)+"foxtools.fll" ADDITIVE GetWind=RegFn("FindWindow","CC","I") wclass=0 winName=Left(_screen.caption,len(_screen.caption)-1) && Trim off the colon - findwindow did not like that. apphand=CallFn(GetWind,wclass,winName) IF apphand<>0 =mymessage('There is already a version of job control running from this machine.'+chr(13)+; 'Only one version of JC can be running at a time.') close all clear all on error *!* if type('cOldScreenCaption')='C' *!* _screen.caption=cOldScreenCaption *!* endif clear events clear set sysmenu to default * Exit out of VFP RETURN ENDIF Modify Window screen TITLE winName SET LIBRARY TO &lcLibraryBut I would not recommend it. Check API section here for the Ed Rauh's CreateEvent example.