Click here to Skip to main content
15,901,284 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

We have an application that has been migrated from VB6 to VB.NET. We have created Masked Edit Custom Control with additional behaviors to the Masked Edit control. Also, we have some validaton that validates the text entered into the custom control during the Leave event of the control.

The Event works properly when we tab out of the control, the problem is we use a bottom form which has buttons to navigate to other forms, hence when we click either the next button the validation event fires twice for the first time, other times it is working perfectly.

I have been searching about this odd behaviour of the control, but couldn't find any proper solution for this.

Hope I get some solution here.
Thanks in advance.
Posted
Updated 25-Aug-10 8:30am
v2

1 solution

At the end of the event handler, set e.Handled to true, and see if that fixes your problem.
 
Share this answer
 
Comments
Dalek Dave 25-Aug-10 9:42am    
Wow, you can read his code from there? :)
krishnachaithanyatvs@gmail.com 25-Aug-10 23:59pm    
Hi John ,
There is no e.Handled in either of the Leave or Validating events .

Thanks for you reply .

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900