473,382 Members | 1,639 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Validating event

Is there a way to cancel the validating event on the
closing event?

I have 2 textboxes that I use the validating event to
check for numeric data. If I try to close the form
without putting a number in, it calls the validate event
and pops up my MsgBox.

Thanks!
Nov 20 '05 #1
4 2917
Cor
Eric.
Take a look for the keywords cancel validating event on MSDN.
This handles it, but I forgot if it was e.cancel= true or e.cancel=false
take a look what it is in your situation.
I thought it was true.
Cor
Nov 20 '05 #2
-----Original Message-----
Eric.
Take a look for the keywords cancel validating event on MSDN.This handles it, but I forgot if it was e.cancel= true or e.cancel=falsetake a look what it is in your situation.
I thought it was true.
Cor
Cor,
The problem is that I also have a closing event. If I am
validating data in a textbox for numeric values, using
IsNumeric, and the text box is empty and I click my exit
button, it is calling that TextBox validating event.
Where would the code go to not call this validating event?

Nov 20 '05 #3
Cor
Hi Eric
There was a good sollution in this newsgroup from Jeffrey Tan,
Someone cleaned it up.
There stayed another sollution from Jeffrey, describes the problem good, but
gives not such a nice sollution.
After that in a good discussion wherein I was involved a Billy, Jeffrey
changed his sollution to the right one.
That sollution is still partial in this newsgroup on 29-8 too but only some
end thread OT discussion.
I thougth it would stay, so I could find it on Google, but someone has
cleaned it up.
Sorry for you,
I d' nt have it now and d'nt remember it exact and I said to someone to look
something over before, so I do that first.
I placed Jeffreys name in the subject, maybe he sees it and has it still so
he can repost it.
Cor
Nov 20 '05 #4
-----Original Message-----
Hi Eric
There was a good sollution in this newsgroup from Jeffrey Tan,Someone cleaned it up.
There stayed another sollution from Jeffrey, describes the problem good, butgives not such a nice sollution.
After that in a good discussion wherein I was involved a Billy, Jeffreychanged his sollution to the right one.
That sollution is still partial in this newsgroup on 29- 8 too but only someend thread OT discussion.
I thougth it would stay, so I could find it on Google, but someone hascleaned it up.
Sorry for you,
I d' nt have it now and d'nt remember it exact and I said to someone to looksomething over before, so I do that first.
I placed Jeffreys name in the subject, maybe he sees it and has it still sohe can repost it.
Cor
.
Thanks

Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Alex Bink | last post by:
Hi, I have a validating event on a textbox in which I want to prevent the user to leave the textbox without entering the right data. Only if he clicks on another specific control he is allowed...
0
by: Joe | last post by:
Hi For a while now I have been finding postings of problems with the validating event not firing on controls properly. I too had this problem. The event would fire when clicking on another...
2
by: Chris Dunaway | last post by:
I have a form with a textbox and numerous panels, buttons and other controls. I have handled the textbox Validating and Validated events. The textbox will hold a filename. In the validating...
0
by: Matthew | last post by:
All, I have searched google and the newsgroups but can't find anything the same as what I am experiencing (though I may have missed something). I have controls (textboxes) within UserControls...
0
by: Gary Shell | last post by:
I am experiencing some strange behavior between a UserControl's validating event and a treeview control. Initially, I thought it was related to an issue in the Knowledgebase article 810852...
21
by: Darin | last post by:
I have a form w/ a textbox and Cancel button on it. I have a routine to handle textbox.validating, and I have the form setup so the Cancel button is the Cancel button. WHen the user clicks on...
4
by: easoftware | last post by:
I am using VS .Net 2003 and VB. I have an app with one parent and two Mdi child forms. I need to validate data in the Mdi form. The Form.Validating event works when I try to close a Mdi form,...
6
by: Ryan | last post by:
I have a windows form that I want to force validation on controls (text boxes) when the user clicks a "Save" button. The only way I've found to do this is to cycle through every control and call...
16
by: Al Santino | last post by:
Hi, It appears displaying a messagebox in a validating event will cancel the subsequent event. In the program below, button 2's click event doesn't fire if you open a dialog box in button 1's...
3
by: TheSteph | last post by:
Hi Experts ! I have a Winform Program in C# / .NET 2.0 I would like to ensure that a value in a TextBox is a valid Int32 when user get out of it (TextBox loose focus)
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.