Q: Validating a control on a form

  • Thread starter Thread starter Visual Systems AB \(Martin Arvidsson\)
  • Start date Start date
V

Visual Systems AB \(Martin Arvidsson\)

Hi!

I have written a simple validating event for a couple of textbox's on a
form.

They validate just fine when leaving the form, now for the problem. If i
click a button to begin execution, i want to validate all the textforms
before it can proceed.

I have tried to send validate to the form, but it just wont validate. Do i
have to issue the validate on every textbox containg the validating event?
Is it possible to automating that some how?

Regards
Martin
 
Hi,

What abou if in the onclick handler of the button you just call the
validatin method:

Later all you have to do is check if the validation was ok or not

void Button1_OnClick( ... )
{
Form1_Validate( null, null);


}

cheers,
 
Back
Top