By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,165 Members | 1,399 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,165 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.