473,320 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Shutting down event

Hi

How can my app check if windows is being shutdown so it can do the necessary
clean up and close?

Thanks

Regards
Aug 7 '08 #1
1 839
>How can my app check if windows is being shutdown so it can do the necessary
>clean up and close?
Handle the SystemEvents.SessionEnding event.
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Aug 7 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Jesper | last post by:
Does anyone know some c++ code for shutting down windows? I want to write a program using borland c++ builder to shut down windows. --
1
by: mikelostcause | last post by:
I'm working on shutting down an app that runs in the system tray, I have no problems shutting down, but I have problems saving data first. if the base.WndProc(ref m) is placed at the top, it...
5
by: mdb | last post by:
I have an app that I want to keep open (and hidden with an icon in the taskbar) when the user presses the 'X' close window button. So I capture the Closing event on the form and check a bool...
4
by: Eddie | last post by:
Hi All, In my application, every time the user "Close" the form, I cancel the close and I put a NotifyIcon in the systray. Here is my code : Private myForm_Closing(... ... ...) Handels...
2
by: Rahul | last post by:
IIS in our server is shutting down automatically on its own. I don't know what is the problem? Please suggest?
4
by: Markus Stoeger | last post by:
Hi, I have a problem with Application.Run() when Windows is shutting down. Please have a look at the copy&paste example program below. The application has no forms. It has only got a notify...
3
by: leocwh | last post by:
Dear all, I would like to know how to run the execuatable before windows shutting down. Here is my simple code: Private Sub Command1_Click() Shell "C:\abc.bat", vbNormalFocus End Sub ...
6
by: _AnonCoward | last post by:
I have a windows GUI application (vb.net 2.0) and I need to manage how it is closed. I want to have a single function that is called whenever the user tries the close the app regardless of how: ...
2
by: Jack | last post by:
Sorry for the double post (also in the IIS group). We've got an ASP.Net 2.0 app running on IIS6. We kept losing sessions, and enabled health monitoring to see what was happening. This morning...
2
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi I am monitoring web apps with the windows event log and noticed several (Hosting environment is shutting down) statements. The server appears to still be running, just wondering any ideas on...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.