ho un piccolo problema: alla pressione del tasto B dovrebbe cambiare il testo di Label1 invece non succede NULLA...


ecco il codice:
codice:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 66 Then
Label1.Caption = "hai premuto B"
End If
End Sub
chi sa illuminarmi? grazie.

[risolto]
ho risolto in questo modo:

codice:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyB Then
Label1.Caption = "hai premuto B"
End If
End Sub