system-sounds

Stop the 'Ding' when pressing Enter

我是研究僧i 提交于 2019-11-26 05:32:00
问题 I have a very simple Windows Forms Application. And, in Windows (or, atleast Windows Forms Applications), when you press Enter while inside a Single-line TextBox Control, you hear a Ding. It\'s an unpleasent sound, that indicated you cannot enter a newline, because it is a single-line TextBox. This is all fine. However, in my Form, I have 1 TextBox, and a Search Button. And I am allowing the user to Perform a search by pressing Enter after they\'ve finished typing, so they don\'t have to use