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

stop closing event from validating

P: n/a
Greetings

I am sure this is a simple question. But I have "googled" it to death
and have only found one answer that involved a bunch of window's API
calls that I did not understand.

I am a student taking VB.NET and we are studying the Validation event
and how to use it on text boxs. I have set the forms.causevalidation
property to false. But if the user has bad data in the text box and
just wants to quit the program by clicking on the control box 'x' on the
upper right corner of the form they are stuck until they correct the
data in the text box. It appears some how the closing event is firing
some sort of validating event. I found a post from Herfried to set the
offending text box's causes validation to false in the form closing
event and that will work the second time the user tries to close the
form but not the first.

I do have the exit button working correctly, but that seems cheesy to me
to not be able to close the form.

Any ideas?

thanks

Bob

Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Cor
Hi Bob,
I know it is (if I understand you well) the e.cancel in the validating
event, that has to be set to true or false to in this kind of situations.

Only I once have took time to searched what it was, put it in this newsgroup
and suddenly it was disapeared.

I now have the feeling not to do it again, I only remember me that it was
what you not would expect so probably false.

So do me a favour, find it out what it is "true" or "false" and send that
back to this newsgroup in this thread.

If you don't succeed, message it, than I will look again
I hopes we help each other?

Cor
Nov 20 '05 #2

P: n/a
Hi Cor

Cor wrote:
Hi Bob,
I know it is (if I understand you well) the e.cancel in the validating
event, that has to be set to true or false to in this kind of situations.
Yes that is exactly what I was talking about. How to stop the e.cancel
from being set to true in the text box validating event when I am
closing the form by way of the control box in upper right hand corner.

Only I once have took time to searched what it was, put it in this newsgroup
and suddenly it was disapeared.
Sounds like the story of my life <grin>

I now have the feeling not to do it again, I only remember me that it was
what you not would expect so probably false.

So do me a favour, find it out what it is "true" or "false" and send that
back to this newsgroup in this thread.

If you don't succeed, message it, than I will look again
I hopes we help each other?

Cor

thanks Bob

Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.