Jump to next textbox upon character entering

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Xero

    #1

    Jump to next textbox upon character entering

    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.

    --
    Xero


    My personal web portal
  • One Handed Man \( OHM - Terry Burns \)

    #2
    Re: Jump to next textbox upon character entering

    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.SendWa it("{TAB}")

    HTH




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

    Dim ch() As Char = "ufssz/cvsotAhsfbuTpmv ujpotXjui/OFU".ToCharArra y()
    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))
    --


    "Xero" <jeff_@_chezjef f_._net(remove_ underscores_and _this)> wrote in message
    news:7AD82BE5-EA50-44F0-B1D4-6C0287760330@mi crosoft.com...[color=blue]
    > 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.
    >
    > --
    > Xero
    >
    > http://www.chezjeff.net
    > My personal web portal[/color]


    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: Jump to next textbox upon character entering

      "One Handed Man ( OHM - Terry Burns )" <news.microsoft .com> schrieb:[color=blue]
      > Secondly, if you want to move to the next control after one character is
      > changed, then you can use
      > SendKeys.SendWa it("{TAB}")[/color]

      .... or:

      \\\
      Me.GetNextContr ol(Me.ActiveCon trol, ...).Focus()
      ///

      --
      Herfried K. Wagner [MVP]
      <URL:http://dotnet.mvps.org/>


      Comment

      • One Handed Man \( OHM - Terry Burns \)

        #4
        Re: Jump to next textbox upon character entering

        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/cvsotAhsfbuTpmv ujpotXjui/OFU".ToCharArra y()
        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))
        --


        "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
        news:OPD5a71wEH A.3808@TK2MSFTN GP15.phx.gbl...[color=blue]
        > "One Handed Man ( OHM - Terry Burns )" <news.microsoft .com> schrieb:[color=green]
        >> Secondly, if you want to move to the next control after one character is
        >> changed, then you can use
        >> SendKeys.SendWa it("{TAB}")[/color]
        >
        > ... or:
        >
        > \\\
        > Me.GetNextContr ol(Me.ActiveCon trol, ...).Focus()
        > ///
        >
        > --
        > Herfried K. Wagner [MVP]
        > <URL:http://dotnet.mvps.org/>
        >
        >[/color]


        Comment

        • Herfried K. Wagner [MVP]

          #5
          Re: Jump to next textbox upon character entering

          "One Handed Man ( OHM - Terry Burns )" <news.microsoft .com> schrieb:[color=blue]
          > For some reason, I can never remember that method name,
          > so I ( badly ) end up resorting to sendkeys which is out of date really.[/color]

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

          --
          Herfried K. Wagner [MVP]
          <URL:http://dotnet.mvps.org/>


          Comment

          Working...