README.md

December 4, 2022 ยท View on GitHub

StopTextBoxFromBeeping

Description

Show how to make a text box not beep but do something else when I hit the Enter key. This code example makes nothing happen, for an extended period of time:

More Info

Submitted On
ByVB FAQ
LevelUnknown
User Rating4.2 (161 globes from 38 users)
CompatibilityVB 3.0, VB 4.0 (16-bit), VB 4.0 (32-bit), VB 5.0, VB 6.0
CategoryCustom Controls/ Forms/ Menus
WorldVisual Basic
Archive File

Source Code

Sub Text1_KeyPress (KeyAscii As Integer)
If KeyAscii = 13 Then '13 is Key_Return
KeyAscii = 0
End If
End Sub