473,441 Members | 1,911 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,441 software developers and data experts.

bypassing validation with a button click

I validate - through a delegate - several textbox data when an 'add' button
is clicked. However, when the 'close' button is clicked, I don't want to
validate - I just want to window to close. I know how to override the
validation when the window's 'x' button is clicked with the following:

Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)

If m.Msg = &H10 Then

needvalidating = False

End If

MyBase.WndProc(m)

End Sub

But I can't figure out what to do with a 'close' button on the screen - the
validation begins before any code inside the close.click, so how can I do
this?

Thanks for any help.

Bernie Yaeger


Nov 23 '05 #1
2 2101
Bernie,

In my idea did we not see you a while. I am glad to see you back.

I don't see why you use a delegate (reference) for this simple problem and
don't call the validating procedure direct by its method, it can not be
threading, because for that you spent almost for sure more time by starting
that threading, than your validating can take time.

However, that is not so important, what I don't see is how that procedure
can be started by pushing at the close x button. You told that it started by
an 'add' button. So it should not be done by a close.
I validate - through a delegate - several textbox data when an 'add'
button is clicked. However, when the 'close' button is clicked, I don't
want to validate - I just want to window to close. I know how to override
the validation when the window's 'x' button is clicked with the following:

Can you give us some information about that?

Cor
Nov 23 '05 #2
"Bernie Yaeger" <be*****@optonline.net> schrieb:
I validate - through a delegate - several textbox data when an 'add'
button is clicked. However, when the 'close' button is clicked, I don't
want to validate - I just want to window to close. I know how to override
the validation when the window's 'x' button is clicked with the following:


See:

<URL:http://groups.google.de/group/microsoft.public.dotnet.framework.windowsforms/msg/e29f17fc4b6b7d68>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 23 '05 #3

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

Similar topics

7
by: Marina | last post by:
Imagine a form with some fields and an OK buttons that saves the information. Each field has validation logic in the Validating event. If the input is not valid, the control's value is replaced...
7
by: A.M | last post by:
Hi, I have a validation control in my page that upon any invalid data, it disables all buttons in the page. basicly i don't have any postback in the page if the validator finds any error. How...
3
by: MB | last post by:
Hi, I am doing a project which uses asp.net to develop its forms. The form uses validation web controls to validate the data entered in text boxes. When Cancel Button is pressed which is to exit...
3
by: Russ | last post by:
How can I cause validation to not take place when a certain button click event fires? I have a page with 2 buttons. If one of them is clicked I want the field validated. If the other is...
2
by: Martyn Fewtrell | last post by:
Dear All I have a Windows 2003 Server with IIS6 where the validation controls on ASP.Net pages no longer work. I believe it to be specific to the server as if I create an ASP.Net page on the...
1
by: rmgalante | last post by:
I have written an ASP.Net application that uses the standard client-side and server-side validation for various fields on the form. Some of the customers that use the form report symptoms that...
4
by: David Colliver | last post by:
Hi all, I am having a slight problem that hopefully, someone can help me fix. I have a form on a page. Many items on the form have validation controls attached. Also on this form are...
2
by: Tim Frawley | last post by:
Source code attached indicates my problem with validation and a button bar save button. Fill the Textbox with some text then tab off the control. The message box will display the text in the...
5
by: Micky | last post by:
VB v7.1.3088 NET v1.1.4322 SP1 My mate has a strange problem regarding the ESC key and validation. When he hits the Cancel button on his form, the form does not validate. This is correct...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.