SET LIBRARY TO SYS(2004)+'foxtools.fll' ADDITIVE * FindWindow() takes two parameters and returns the handle of the * window, HWND, if it was found. GetWind = RegFn('FindWindow', 'CC', 'I') *Set the first parameter of the call to getwind to 0, null. wclass=0 winname='My Application' apphand=CallFn(GetWind,wclass ,winname) *If the call was successful, stop processing. IF apphand<>0 WAIT WINDOW ; 'You cannot start another instance of the window 'My Application'!' QUIT ENDIF MODIFY WINDOW screen TITLE 'My Application' WAIT WINDOW ; 'The first instance of the window 'My Application' is running.'