Clicking on the Exit Windows button will invoke the standard Windows shutdown procedure, provided that all Windows tasks agree to terminate.
System
Label2
If you are working inside the Visual Basic environment, and you have changed your application, you will *NOT* be prompted to save your work. This is because Windows knows that the termination request is
System
Label3
Ffrom Visual Basic and does not notify VB of the impending termination.
System
Command1
Exit Windows
System
Command2
Cancel
System
Label1
Command1
Command2
Command2_Click
Command1_ClickO
Success
ExitWindows
Reserved/
Form1
Label2
Label3
SendMessage
WM_QUERYENDSESSION
OkToTerminate
Form_Click
TaskHandle
GetCurrentTaskr
ParentWnd
GetParentG
Owner
GetWindow
GW_OWNVER
GW_OWNER
Windows
PostAppMessage:
Message
environment
changed
application
prompted
changes
Form_Load
WinExit
Command2_Click
Command1_Click
If you are running inside the VB "
environment, and you have changed
your application, you will not be
prompted to save your changes!
Exit Windows
If the function is successful, no code will be
executed after the ExitWindows call. If the
function is not successful, control will be
returned to your program.
Return errorlevel 1
If your code gets here, then a message has already
been displayed to the user, telling him to terminate