[Form].OnClosing - e.Cancel = True???

  • Thread starter Thread starter Phill W.
  • Start date Start date
P

Phill W.

Has any come across a situation where, in a Form-derived .. er .. Form,
the Event Arguments passed to OnClosing /already/ have their Cancel
argument set to True?

Protected Overrides Sub OnClosing( _
ByVal e As System.ComponentModel.CancelEventArgs _
)
Debug.WriteLine("e.Cancel=(" & e.Cancel.ToString() & ")")
' It's True already !!

MyBase.OnClosing(e)
.. . .

This is making closing my form just a /little/ difficult!

Any suggestions where to start looking?

TIA,
Phill W.

ps. I'm using VB 2003 (v7.1.3088) on Windows XP, SP2.
 
It could have to do with validating events on controles who have
causesvalidation set to true. I had the same problem once, and with me that
was the cause. Do a search on this group via google and search for: e.cancel
causesvalidation

Hope this helps

Greetz Peter
 
Back
Top