'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:
Private Sub tab_2_txtSearchByPhone_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) _
Handles tab_2_txtSearchByPhone.KeyPress
'Purpose : Detects when the Enter button is pressed.
If e.KeyChar = Chr(13) Then
e.Handled = True
GetHistory(RemoveChar(tab_2_txtSearchByPhone.Text, "-"c), True)
End If
End Sub