Re: Stopping Default Sound from Playing
- From: Mehdi <vioccc@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 11 May 2007 17:13:53 +0100
On Fri, 11 May 2007 08:57:00 -0700, Vernon Peppers wrote:
The barcode scanner acts like a keyboard. The data is entered by the barcode
scanner. To all intents and purposes, the program can not tell the
difference between a scan from the barcode scanner, and input from the
keyboard. The Return character is sent by the barcode scanner to indicate
that the barcode is complete. If it is the Return that is causing the
problem, then I possibly could change the Return character to something else,
so that I could test for that character instead. The Return currently tells
the program that the barcode is complete, and to process that barcode, by
creating a new row in the data table, and populating the row with the
barcode, and other data from the input screen.
Since I don't have the scanner in my possession to reprogram it, is there
any way to turn this beep off?
Alright, I get it now. Well, I see 2 solutions:
- turning the beep off. There are hacks that allow you to turn it off
without modifying the system sound settings. I did it a while ago though
can't remember exactly what I did. However if you search Google Groups for
Textbox Return (or Enter) Beep, you'll find a lot of discusions about this.
You shouldn't have too much troubles switching off the beep.
- Set a default Accept button on your form. If your form has a default
Accept button, pressing Enter while in the textbox will press this button
instead of doing nothing and beeping. So you could maybe have an OK button
set as the Accept button of your form which, when pressed, would add the
new data in the datatable. Actually, using an Accept button will introduce
other problems (it will by default automatically set the DialogResult value
of your form which will cause it to close if it has been shown modally) so
if you've got your program already done and working the way you want the
best solution would probably be to just switch off the beeping sound
following Google Groups suggestions.
.
- References:
- Re: Stopping Default Sound from Playing
- From: Mehdi
- Re: Stopping Default Sound from Playing
- From: Mehdi
- Re: Stopping Default Sound from Playing
- Prev by Date: XML Exception
- Next by Date: Re: Check Box Binding
- Previous by thread: Re: Stopping Default Sound from Playing
- Next by thread: MSBuild Custom task to prompt for input
- Index(es):