Peter,
What exactly do you mean by exit gracefully?
Brute force method is as you say:
On error *
On shutdown quit
Clear events
quit
and to shut down the machine if you need to:
#define nLogOff 0
#define nReboot 2
#define nForceLogOff 4
#define nForceReboot 6
#define nPowerDown 8
#define nForcePowerDown 12
IF MessageBox("Do you want to shut down this computer?", 4, "System
Shutdown") = 6
LOCAL osObj, osColl, loObjs
osColl = GetObject("winmgmts:{(Shutdown)}")
loObjs = osColl.ExecQuery("Select * from Win32_OperatingSystem")
For Each osObj in loObjs
osObj.Win32Shutdown(nForcePowerDown)
Next
ENDIF
Dave Crozier
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Peter Cushing
Sent: 23 January 2008 12:23
To: ProFox (Wierdo) List
Subject: Exit application on way out of form
Hi all,
Just trying to get my application to exit when I close a particular
form. I know I can issue a QUIT and that would do it but I want to try
to exit gracefully and can't seem to find a way of doing it.
Any ideas?
TIA
Peter
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.