CancelEvent

Jun 26 2006 8:39 AM

Hello!

I've written the following code for the Main window of the Application:

private void frmMain_Closing(object sender, CancelEventArgs e){
     e.Cancel = true;
     this.Visible = false;
}

So if you click on the "Chancel" Button in the upper right corner, the Application will not be closed.
-> The problem is, that I can't restart or shut down my computer, while the Application is running!

Any resons for that?


Thanks
SBCJB


Answers (2)