Cara Disable Bunyi 'Beep' di Textbox ketika menekan tombol ' Enter' di VB.net pada Event KeyPress Atau KeyDown
Cara 1
Digunakan pada event keyDown, Atur properties textbox multiline ke False
If e.KeyCode = Keys.Enter Then
e.SuppressKeyPress
= True
End If
Atau
Select Case e.KeyCode
Case Keys.Enter
e.SuppressKeyPress = True
Textbox1.Focus()
End Select
Cara 2
Digunakan pada event
KeyPress, Atur properties textbox multiline ke False
Private Sub Text1_KeyPress (KeyAscii as Integer)
If KeyAscii=13 Then
KeyAscii=0
End If
End Sub
No comments