vb.net - 当用户在文本框控件上按 Enter 时,如何抑制烦人的哔哔声?
问题描述
在 VS2019/Visual Basic 中,如何抑制用户在文本框控件中输入数据时出现的铃声(哔声)?
这是代码。
提前致谢。
Private Sub TxtJumpTo_KeyPress(sender As Object, e As KeyPressEventArgs) Handles TxtJumpTo.KeyPress
If e.KeyChar = ControlChars.Cr Then
'Do things
Else
'Else do other things
End If
'Reset the text box
TxtJumpTo.Text = ""
End If
End Sub
解决方案
推荐阅读
- reactjs - 不刷新页面删除数据
- angular - 如何将验证器和 CSS 样式传播到自定义 Angular 表单组件中的输入控件?
- objective-c - NSOutlineView 将多个项目拖放到单个 xml 文件 Finder
- c - 快速排序实现不在 C 中排序
- c# - Bit twiddling:从 ulong 中获取表示哪些字节非零的位掩码
- r - theme_minimal() 中的中心标题和副标题
- ffmpeg - ffmpeg 降低帧率
- c# - Mailkit 将垃圾数据添加到 HTML 电子邮件
- angular - Ionic Cordova 应用程序无法在 android 9 设备上运行
- python - 从一列字符串中提取整数