Can't close a window form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am having a problem closing a window form. Calling Close() or click X does close it after a certain combination of events. When I overrode OnClosing, I found that the CancelEventArgs's Cancel property was set to true. Would some one help me out why CancelEventArgs's Cancel property be set to true?
 
* "=?Utf-8?B?RGF2ZQ==?= said:
I am having a problem closing a window form. Calling Close() or click
X does close it after a certain combination of events. When I overrode
OnClosing, I found that the CancelEventArgs's Cancel property was set to
true. Would some one help me out why CancelEventArgs's Cancel property
be set to true?

Maybe the famous "form close bug"?

C# code to repro the close bug:

<http://www.jelovic.com/binaries/WindowsFormsCloseBugDemo.zip>

Some information on the bug:

<http://makeashorterlink.com/?T2FC26194>

Fixed in .NET 1.1.
 
Thanks for the response. This is probably not that problem because I am now using DevStudio 2003 with .Net 1.1. (I used to have that problem and that probelm did go away with 1.1)
 
Back
Top