470,628 Members | 2,354 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,628 developers. It's quick & easy.

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

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.
Feb 8 '06 #1
1 3798
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

--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning. (Rich Cook)

"Phill W." <p-***********@o-p-e-n.a-c.u-k> schreef in bericht
news:ds**********@yarrow.open.ac.uk...
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.

Feb 9 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Jules Winfield | last post: by
2 posts views Thread by Steve McLellan | last post: by
2 posts views Thread by richard.martino | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.