beep

Disable beep of enter and escape key c#

大城市里の小女人 提交于 2019-11-26 11:36:33
问题 I want to disable the beep sound that i get when i press enter in a textbox . My KeyDown event is: private void textBox_Zakljucak_KeyDown(object sender, KeyEventArgs e) { if ((e.KeyCode == Keys.Enter) || (e.KeyCode == Keys.Tab)) { Parent.SelectNextControl(textBox_Zakljucak, true, true, true, true); } else if ((e.KeyCode == Keys.Back)) { textBox_Zakljucak.Select(textBox_Zakljucak.Text.Length, 0); } else if (!Regex.IsMatch(textBox_Zakljucak.Text, @\"^[0-9.-]+$\")) { textBox_Zakljucak.Clear();

Beep on Linux in C

老子叫甜甜 提交于 2019-11-26 11:24:12
问题 I want to generate a beep sound with a specific frequency and length (for different sound signals) using the system beeper (and only the speakers if beeper is not available / accessible). I know it is possible to do this by using ioctl, but that requires root access, which I don\'t want. I know I could just use the \"beep\" command, but that would be a dependency, which, if possible, shouldn\'t be used (no external dependencies at all, just the basic linux libraries and C). What I currently

How to disable the beep in emacs on Windows

十年热恋 提交于 2019-11-26 05:28:14
问题 Hi I\'m new to Emacs and I downloaded GNU emacs on my windows machine. I just finished the short tutorial but I found there\'s a beep sound whenever I hit the beginning/end of a file and in many other cases, which is a little disturbing to me. I searched online and I found people saying putting this (setq visible-bell 1) in my .emacs file, but I don\'t know how to do that. First, where is my .emacs file and what is it? Or is there another way to do it? I mean in the emacs window menu there is

How do I make JavaScript beep?

ぃ、小莉子 提交于 2019-11-26 01:38:46
问题 I want my web page to beep whenever a user exceeds the maximum character limit of my <textarea> . 回答1: It's not possible to do directly in JavaScript. You'll need to embed a short WAV file in the HTML, and then play that via code. An Example: <script> function PlaySound(soundObj) { var sound = document.getElementById(soundObj); sound.Play(); } </script> <embed src="success.wav" autostart="false" width="0" height="0" id="sound1" enablejavascript="true"> You would then call it from JavaScript