I tried to implement a feature like msn or yahoo messeger, where the user
click the "x" button, the form just hide itself to the tray icon.
I got it to work by added the following code to the closing event:
// Exit is a bool var false by default
// when i want close rather than hide i set Exit to true
if (!Exit){
e.Cancel = true;
}
that seem to work just fine, however when windows shutdown
since "Exit" still not true, the program remain open and windows refused to
shutdown
now to solve my dilema i need to know if the form called "Closing" event
because of a user or window shutdown function
any help would be appreciated!!!
Thanks,
Du