Results 1 to 4 of 4

Thread: 'attaching' a button to a textbox

Threaded View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489

    'attaching' a button to a textbox

    Why does this not worK? I'm trying to trap the 'enter' key when pressed but debugging shows me that chr(13) isn't detected.
    VB Code:
    1. Private Sub tab_2_txtSearchByPhone_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) _
    2.     Handles tab_2_txtSearchByPhone.KeyPress
    3.         'Purpose : Detects when the Enter button is pressed.
    4.         If e.KeyChar = Chr(13) Then
    5.             e.Handled = True
    6.             GetHistory(RemoveChar(tab_2_txtSearchByPhone.Text, "-"c), True)
    7.         End If
    8.     End Sub
    Last edited by Andy; Jul 26th, 2004 at 01:49 PM.

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