>Is there way to force user to log off or automatically log user off when quitting VFP app ?
>
Yes - you make sure everything is ready to shut down, and call the ExitWindowsEx Win32 API call with the parameters 4,0 - this will force a logoff of the NT user. I'd follow this immediately with a call to ExitProcess() to shut down VFP, something like:
DECLARE INTEGER ExitWindowsEx IN Win32API INTEGER nFlags, INTEGER Reserved
DECLARE INTEGER ExitProcess IN Win32API INTEGER nExitCode
CLOSE ALL
FLUSH
=ExitWindowsEx(4,0)
=ExitProcess(0)