Click here to Skip to main content
15,889,315 members
Home / Discussions / C#
   

C#

 
GeneralRe: Error Messages Pin
BP12829-Jan-04 16:51
BP12829-Jan-04 16:51 
GeneralRe: Error Messages Pin
BP12829-Jan-04 18:01
BP12829-Jan-04 18:01 
GeneralRe: Error Messages Pin
Heath Stewart30-Jan-04 3:34
protectorHeath Stewart30-Jan-04 3:34 
GeneralSecurity Issues Pin
Ken Galer29-Jan-04 10:26
Ken Galer29-Jan-04 10:26 
GeneralRe: Security Issues Pin
Heath Stewart29-Jan-04 13:16
protectorHeath Stewart29-Jan-04 13:16 
GeneralRe: Security Issues Pin
Ken Galer30-Jan-04 2:23
Ken Galer30-Jan-04 2:23 
GeneralRe: Security Issues Pin
Heath Stewart30-Jan-04 3:23
protectorHeath Stewart30-Jan-04 3:23 
GeneralOver ride closing event Pin
Daniel Negron29-Jan-04 9:27
Daniel Negron29-Jan-04 9:27 
**NOOB**

I am over riding the closing event for the main form, Windows Shutdown process halts until the application is manually closed. Then I have to initiate the shutdown sequence again.
Below I have the OnClosing event. I am looking to combine the two below so that they close out the application if Shutdown, Restart or Logoff are initiated.

protected override void OnClosing(CancelEventArgs e)
{

e.Cancel = true;

this.WindowState = FormWindowState.Minimized;
Hide();
}

protected override void WndProc(ref Message m)
{
base.WndProc (ref m);
if (m.Msg == 0x0011)
{
Application.Exit();
//this.Close();
}
}
If I have these 2 methods in place, the application WILL shutoff, BUT it will also halt the shutdown process, and once again I have to start the shutdown process all over again.

Thank you in advance for your help.

**DAN**
GeneralRe: Over ride closing event Pin
Heath Stewart29-Jan-04 13:08
protectorHeath Stewart29-Jan-04 13:08 
GeneralListbox deleting items Pin
Gavin Coates29-Jan-04 8:19
Gavin Coates29-Jan-04 8:19 
GeneralRe: Listbox deleting items Pin
Mazdak29-Jan-04 8:28
Mazdak29-Jan-04 8:28 
GeneralRe: Listbox deleting items Pin
Gavin Coates29-Jan-04 9:09
Gavin Coates29-Jan-04 9:09 
GeneralRe: Listbox deleting items Pin
Mazdak29-Jan-04 9:14
Mazdak29-Jan-04 9:14 
GeneralRe: Listbox deleting items Pin
Gavin Coates29-Jan-04 9:52
Gavin Coates29-Jan-04 9:52 
GeneralRe: Listbox deleting items Pin
thomasa30-Jan-04 0:45
thomasa30-Jan-04 0:45 
GeneralRe: Listbox deleting items Pin
Gavin Coates31-Jan-04 10:17
Gavin Coates31-Jan-04 10:17 
GeneralRe: Listbox deleting items Pin
thomasa1-Feb-04 22:14
thomasa1-Feb-04 22:14 
GeneralMulti-threading Pin
Guinness4Strength29-Jan-04 5:17
Guinness4Strength29-Jan-04 5:17 
GeneralRe: Multi-threading Pin
scadaguy29-Jan-04 10:23
scadaguy29-Jan-04 10:23 
GeneralRe: Multi-threading Pin
Guinness4Strength29-Jan-04 10:27
Guinness4Strength29-Jan-04 10:27 
GeneralRe: Multi-threading Pin
Heath Stewart29-Jan-04 12:55
protectorHeath Stewart29-Jan-04 12:55 
GeneralDatabase Problem, PLEASE HELP Pin
gls2ro29-Jan-04 4:24
gls2ro29-Jan-04 4:24 
Generalconvert web form to windows form Pin
OmegaSupreme29-Jan-04 4:19
OmegaSupreme29-Jan-04 4:19 
GeneralRe: convert web form to windows form Pin
Colin Angus Mackay29-Jan-04 14:40
Colin Angus Mackay29-Jan-04 14:40 
GeneralRe: convert web form to windows form Pin
OmegaSupreme29-Jan-04 23:43
OmegaSupreme29-Jan-04 23:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.