I use ::oSocket and ::oTimer. I have got the problem also.
I start the program with
oTimer:Activate()
Client() -> Connect to Server via Socket.
But It is still in "Task Manager/Processes", when I quit the program. The program do not quit.
I don't know how to quit the program without get stีuck in the memory. I have to end task in Task Manager. How do I fix it?
Code: Select all
DEFINE WINDOW oWnd TITLE 'EZHSC Interface '+cInfVer+' : '+coname+iif(!empty(cBuild),' [B'+cBuild+']','') FROM 0, 0 TO 750, 900 PIXEL ;
MENU BuildMenu() MDI ;
ICON oIcon
oWnd:oFont := oFont
DEFINE TIMER oTimer OF oWnd;
INTERVAL nLoop ;
ACTION if(lRun,MainLoop(),)
SET MESSAGE OF oWnd TO "Copyright (C) for EASYFO Co., Ltd. 1998-"+str(year(date()),4) ;
NOINSET DATE TIME KEYBOARD 2007
ACTIVATE WINDOW oWnd ; // MAXIMIZED ;
ON INIT (oTimer:Activate(), Client(), InfStatus()) ;
VALID (oTimer:Deactivate(), oTimer:End(), .T.)
if oSocket <> nil
oSocket:Close()
oSocket:End()
end
Close all
SET RESOURCES TO
ResAllFree()