Check wheter a button or textbox is clicked.
I have two text boxes (txt1, txt2) and an exit button (btnExit)
In txt1.Leave event; i have some validations. If validation fails then I keep the fous on txt1.
If btnExit is clicked then I do not want to execute the validation and instead close the application.. How do I do it?
Re: Check wheter a button or textbox is clicked.
Do not enable the button until the validation has been completed.
Re: Check wheter a button or textbox is clicked.
The button btnExit needs to be enabled since it's an EXIT button and can be clicked regardless of what was entered in txt1.text.
Re: Check wheter a button or textbox is clicked.
Sorry....I misunderstood you....
If your validations are in the Leave event they will fire immediately after you leave the textbox. It does not matter what you do next. The validations will fire.
What do the validations consist of?
Re: Check wheter a button or textbox is clicked.
txt1.text accepts numeric value (zip code); I validate the zip code.