Results 1 to 4 of 4

Thread: Use Enter Key as Tab

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 1999
    Posts
    239

    Use Enter Key as Tab

    Is it possible to move between textboxes using the <Enter> Key
    instead of the Tab Key? (As in VB6)

  2. #2
    Fanatic Member brown monkey's Avatar
    Join Date
    Jun 2004
    Location
    Cebu
    Posts
    552
    key events mate. sample is the keydown
    VB Code:
    1. Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
    2.       If e.KeyCode = Keys.Enter Then
    3.          TextBox2.focus()
    4.       End If
    5.    End Sub

  3. #3
    Addicted Member
    Join Date
    Aug 2002
    Posts
    224
    Hi,

    No beep !!!

    Code:
        Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtùí_ôøèéí.KeyPress
            If Asc(e.KeyChar) = 13 Then
                e.Handled = True
                SendKeys.Send("{TAB}")
            End If

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jan 1999
    Posts
    239
    thanks yulyos

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width