Código:
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress Dim x As Char Dim m As Integer m = 0 Do x = x + e.KeyChar MsgBox(x) If (Button1.Handle = True) Then m = 1 End If Loop While (m = 1) End Sub
Espero de su ayuda...gracias. :D