Message.Show("unable to shutdown computer myApplicetion is running")
// SystemEvents class is present in Microsoft.Win32 //e.Cancel=true will terminate the log off or shutdown procedure SystemEvents.SessionEnding += new SessionEndingEventHandler((o, e) => { e.Cancel = true; MessageBox.Show("unable to shutdown computer myApplicetion is running"); });
FormClosing
CloseReason
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)