开发者

Weird typewriter sound as I type into a textbox (wpf) in C#

I've made a pretty simple WPF windows with a textbox in it开发者_运维知识库. As I type in it it gives me this weird typewriter-sound. Any idea why? And how can I stop it from doing it?


As there is no built-in functionality in WPF to automatically generate a weird typewriter sound in text boxes, you basically have 2 choices:

  1. Remove the code that you have in the text changed event that plays the weird typewriter sound.
  2. Make sure that you don't have any third party applications that generates weird typewriter sounds on your system.


As Magnus mentions, you may need to check the event handler for the TextChanged, KeyDown, and KeyUp events for the TextBox(es) that give you that response. It is possible to code something to make a sound on every KeyDown or KeyUp event, but there is no setting in Windows to do that, nor does WPF do something like that by default.

I did find some articles that show how to make a "clicky" keyboard, and they all were meant for mobile or touch devices. You may want to check to see if the project config file has a target device set to either one of those.


I've never seen that by default in WPF. Check your system sounds in your Control Panel. Either that or one of your officemates is playing some sort of trick on you.


In case it could help, but I doubt of that: Is that limited to the application you develop? I had this coupled with light display anomalies and it was the graphic card that was dying. The sound was associated with mouse moves on some windows.


It was the most terrible "error" I ever had. :-D Everytime I typed something in my textbox I refreshed a webview. That refreshing made this sound.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜