Z
Zamdrist
So I have my notify icon, the form, the context menu all that jazz
working fine.
My notifyicon has a context menu with an Exit option. Works fine. If
the form is current visible and you close is (X)...it hides itself
rather than close. Double click on the notifyicon, and it reappears.
All is good. But...
When you go to shutdown the computer, the computer wont finish
shutting down unless you exit my notifyicon application.
Here is what I'm doing. I have form level variable called bOnExit. In
the Form's Closing event I have:
If Not bOnExit Then
e.Cancel = True
Me.Hide()
End If
In the Notifyicon's double click event I have:
Me.Show()
In the NotifyIcon's Context Menu click event I have:
bOnExit = True
Me.Close()
So obviously, when you shut down windows, bOnExit won't be true, and
therefore the application wont actually exit, and the windows shutdown
will be interrupted.
How is this supposed to be handled. What is the best practice?
Thanks...
working fine.
My notifyicon has a context menu with an Exit option. Works fine. If
the form is current visible and you close is (X)...it hides itself
rather than close. Double click on the notifyicon, and it reappears.
All is good. But...
When you go to shutdown the computer, the computer wont finish
shutting down unless you exit my notifyicon application.
Here is what I'm doing. I have form level variable called bOnExit. In
the Form's Closing event I have:
If Not bOnExit Then
e.Cancel = True
Me.Hide()
End If
In the Notifyicon's double click event I have:
Me.Show()
In the NotifyIcon's Context Menu click event I have:
bOnExit = True
Me.Close()
So obviously, when you shut down windows, bOnExit won't be true, and
therefore the application wont actually exit, and the windows shutdown
will be interrupted.
How is this supposed to be handled. What is the best practice?
Thanks...