Windows Close

G

Guest

I am trying to capture the windows close event when the operator clicks the
red close icon on the title bar. I need to send a proper exit codeto
scheduler which starts my program.
I have tried
private void WebOrderForm_Closed(object sender, System.EventArgs e){
Application.Exit();
}

private void WebOrderForm_Deactivate(object sender, System.EventArgs e){
Application.Exit();
}

private void WebOrderForm_Closing(object sender,
System.ComponentModel.CancelEventArgs e){
Application.Exit();
}
but nothing seem to work.
 
G

Guest

this should have worked, i think.( I am supposing it is window form not web
form)

private void WebOrderForm_Closing(object sender,
System.ComponentModel.CancelEventArgs e){
Application.Exit();
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top