473,509 Members | 2,950 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

stop closing event from validating

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
2 2030
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1054
by: Bevo | last post by:
I validate my textbox input data on its Validating-event. But what if the textbox has focus when I click on the windows close button? Then I dont want to validate - at least not until I've confirmed...
3
1910
by: Saradhi | last post by:
Hi, I wanted to stop the VS.NET Window from closing inside my C# AddIn. I Know that OnBeginShutdown() funciton will be called whenever the user tries to close the VS.NET window. I want to...
6
10111
by: John S | last post by:
When the user clicks the "X" in the upper right-hand corner of a form, how can I stop the form from closing?
3
2766
by: Charles Law | last post by:
Under what circumstances would e.Cancel be set to True on entry to the Closing event of an MDI child form? I have found that this is why my application won't close properly. I can explicitly set...
19
3203
by: zacks | last post by:
I have a .NET 2.0 MDI application where the child form has a Tab Control. Each of the Tab in the Tab Control has a Validating event to handle what it should do when the user changes tabs. But...
3
2203
by: mtczx232 | last post by:
I have TabControls that Hold Forms on his TabPges (this make me easy to give ability to Designing each form in his IDE window). When form x is in middle of Edit Data Mode, I going to prevent:...
0
7234
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7136
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7344
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7505
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5060
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3203
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1570
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
441
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.