04-06-09, 04:29 #1Registered User
- Join Date
- Mar 2009
Unanswered: Query in Validating Event of an Object in VB.Net
See if u could help me with the following...
I have 4 textboxes on my Form.
I have wriiten code on KeyDown and Validating event ...
I am using keydown event for Enter pressed and Validating for TAB Key press.
The code works fine with the EnterKey Press.
In validating I have written to focus on the next object if the value entered in Textbox is Valid.If its valid the focus is shifted to the next object.But if user wishes to go to another textbox using mouse the Validating event of the Textbox (which is Currently in Focus) is fired and focus is shifted to next object..Which is Right but I want to shift focus to the object which user clicks by Mouse...How is it possible?
04-06-09, 05:37 #2Registered User
- Join Date
- Jul 2003
- Amsterdam, Nederland
classic focus err
<u>Don't even go there !</u>
otherwise you'll have to consider the following
And in one or other way it is impossible to get them right or that the user will do something that F^&%&$ it up.
Do the check and leave the Getfocus and lostfocus to the client or OS
allso you can do is that the downkey jumps to the next controleGreetz Marvels -^.^-
Developments : VB4 Through .Net; Basic; DOS ; CNC ; Sinclair
Databases : SQL Server Through 2005; Access 3 Through 2003 ; Oracle 8 & 9.i ;
OS : Win 3.11 Through XP ; NortonComander ; DOS