|
-
November 20th, 2008, 06:38 AM
#1
[RESOLVED] Problem with hidden app
Hi guys,
I recently made an application which is hidden most of the time, during which it is represented by a tray-icon (NotifyIcon).
The app runs well and users are happy. Right up until it's time to shut down the computer. XP users complain that the app will make shutdown of their machine impossible until the process is killed.
I think this is because I have handled the main form's FormClosing event to allow a "close-to-tray" function. In Vista, this isn't a problem, but XP doesn't seem to handle it very well.
My question to you: is there a way I can check whether the computer is shutting down from my FormClosing eventhandler?
It's not a bug, it's a feature!
-
November 20th, 2008, 07:20 AM
#2
Re: Problem with hidden app
Code:
private void Form1_FormClosing(object sender, FormClosingEventArgs e) {
if (e.CloseReason == CloseReason.WindowsSjutDown) {
}
}
Busy 
-
November 20th, 2008, 08:00 AM
#3
Re: Problem with hidden app
I just found that solution in another forum too 
Resolved, thanks!
It's not a bug, it's a feature!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|