how to find out when system going to be shut down
-
hi !!!!!!!!! i want to know how to write code on system shut down event Azad Yadav
-
hi !!!!!!!!! i want to know how to write code on system shut down event Azad Yadav
Check the documentation for the windows messages
WM_QUERYENDSESSION
andWM_ENDSESSION
.«_Superman_»
-
hi !!!!!!!!! i want to know how to write code on system shut down event Azad Yadav
Handle the
FormClosing
event. It gives you the close reason.void YourForm_FormClosing(object sender, FormClosingEventArgs e)
{
if (e.CloseReason == CloseReason.WindowsShutDown)
{
// windows is shutting down
}
}Navaneeth How to use google | Ask smart questions
-
hi !!!!!!!!! i want to know how to write code on system shut down event Azad Yadav
SystemEvents.SessionEnding Event[^]
Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion