Solved the problem, just curious really

  • Thread starter Thread starter Michael Culley
  • Start date Start date
M

Michael Culley

I have an MDI application that was occasionally refusing to close. When clicking on the cross at the top right the app would just
not do anything and the only way to close it was to terminate it. The problem ended up being that in the Form_Closing event had
e.Cancel = True even though I've not set it to true (it took a while to find because it only ever happened once in the IDE). Setting
it to false fixed the problem. I've done a fair bit of searching and this problem has been encountered by many people but I couldn't
find any real solution. Most people reported that the closing event never fired but in my case it did. Does anyone know anything
about this?
 
Try turning "break on exception" on.

Is your child form performing anything during the Validating event? Your
problem rings a bell (softly, distantly) about a similar problem I had with
this.

Not much more comes to mind without seeing more of what you're doing :)

Regards,
Matt

Michael Culley said:
I have an MDI application that was occasionally refusing to close. When
clicking on the cross at the top right the app would just
not do anything and the only way to close it was to terminate it. The
problem ended up being that in the Form_Closing event had
e.Cancel = True even though I've not set it to true (it took a while to
find because it only ever happened once in the IDE). Setting
it to false fixed the problem. I've done a fair bit of searching and this
problem has been encountered by many people but I couldn't
find any real solution. Most people reported that the closing event never
fired but in my case it did. Does anyone know anything
 
Go to your Debug menu, choose "Exceptions...", select "Common Language
Runtime Exceptions" then select "Break into the debugger".

Regards,
Matt
 
Back
Top