Jump to next textbox upon character entering

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello. I am using vb.net.

I have a series of textboxes and each of them can contain one letter only.
How can I get the cursor jump to the next textbox after one has been filled
with a letter? Thanks.
 
First of all set the MaxLength property to 1

Secondly, if you want to move to the next control after one character is
changed, then you can use
SendKeys.SendWait("{TAB}")

HTH




--
OHM ( Terry Burns ) * Use the following to email me *

Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
 
One Handed Man ( OHM - Terry Burns ) said:
Secondly, if you want to move to the next control after one character is
changed, then you can use
SendKeys.SendWait("{TAB}")

.... or:

\\\
Me.GetNextControl(Me.ActiveControl, ...).Focus()
///
 
For some reason, I can never remember that method name, so I ( badly ) end
up resorting to sendkeys which is out of date really.


--
OHM ( Terry Burns ) * Use the following to email me *

Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
 
One Handed Man ( OHM - Terry Burns ) said:
For some reason, I can never remember that method name,
so I ( badly ) end up resorting to sendkeys which is out of date really.

I agree that 'SendKeys' is more "RAD" ;-))).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top