Tab Key in VB6

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Oct 2008
Posts: 6
Reputation: DhruvaRai is an unknown quantity at this point 
Solved Threads: 0
DhruvaRai DhruvaRai is offline Offline
Newbie Poster

Tab Key in VB6

 
0
  #1
Oct 21st, 2008
Hi there

I would like VB6 procedure to execute the TAB key as soon as the maximum length data is entered on the text box without having to press the TAB key.

Text box has a maximum length of 5 characters. What code do I use to automatically move the cursor to the next box as soon as the 5 characters are typed?

Would be grateful for your advice.

Thanks
Drew
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 2,134
Reputation: debasisdas will become famous soon enough debasisdas will become famous soon enough 
Solved Threads: 132
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Postaholic

Re: Tab Key in VB6

 
0
  #2
Oct 21st, 2008
you need to code the text_change event of the textbox.
and calculate the length.
once length reaches the desired length set focus on to the next control.
Share your Knowledge.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 16,268
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 544
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: Tab Key in VB6

 
0
  #3
Oct 21st, 2008
I do believe there is a command (len?) to get the length of a string in vb6
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC