Board index » delphi » Bell sound when pressing enter in a TEdit field

Bell sound when pressing enter in a TEdit field

Every time I press enter in this field I get this aggravating bell sound.
I've searched through the associated code, and don't see anything that
should be causing it. Anyone seen this before? Any ideas how to stop it?

Thanks,
   Donald Mullican

 

Re:Bell sound when pressing enter in a TEdit field


It's standard Windows behaviour to sound the bell when you press a key which
is not processed by any control, as a signal to the user that this key is
not used.
Apparently your form does not use the enter key, hence the sound.
Why do you press Enter when you don't use it?

If you really want to stop it you can just change the Key to #0 in the
TEdit's OnKeyPress event.

Finn Tolderlund

And please do not crosspost.

"Donald Mullican" <dtmulli...@hotmail.com> skrev i en meddelelse
news:G7Sv7.109845$aZ6.25371642@news1.rdc1.az.home.com...

Quote
> Every time I press enter in this field I get this aggravating bell sound.
> I've searched through the associated code, and don't see anything that
> should be causing it. Anyone seen this before? Any ideas how to stop it?

Re:Bell sound when pressing enter in a TEdit field


But I do use it. I test for it in KeyPressed to determine when to send the
string.

Donald Mullican

Quote
"Finn Tolderlund" <XnospamYfi...@Ymail.tdcadsl.dkXnospamY> wrote in message

news:3bbff5c3$0$42060$edfadb0f@dspool01.news.tele.dk...
Quote
> It's standard Windows behaviour to sound the bell when you press a key
which
> is not processed by any control, as a signal to the user that this key is
> not used.
> Apparently your form does not use the enter key, hence the sound.
> Why do you press Enter when you don't use it?

> If you really want to stop it you can just change the Key to #0 in the
> TEdit's OnKeyPress event.

> Finn Tolderlund

> And please do not crosspost.

> "Donald Mullican" <dtmulli...@hotmail.com> skrev i en meddelelse
> news:G7Sv7.109845$aZ6.25371642@news1.rdc1.az.home.com...
> > Every time I press enter in this field I get this aggravating bell
sound.
> > I've searched through the associated code, and don't see anything that
> > should be causing it. Anyone seen this before? Any ideas how to stop it?

Re:Bell sound when pressing enter in a TEdit field


In article <2ZSv7.110108$aZ6.25423...@news1.rdc1.az.home.com>, "Donald

Quote
Mullican" <dtmulli...@hotmail.com> writes:
>But I do use it. I test for it in KeyPressed to determine when to send the
>string.

_After_ you've tested it _then_ set it to #0.

The key is passed to OnKeyPress to enable you to test/change it (as a "var"
parameter). After that it is passed to windows, which dings you if it does not
recognise the key as a useful one.

Alan Lloyd
alangll...@aol.com

Re:Bell sound when pressing enter in a TEdit field


Quote
"Donald Mullican" <dtmulli...@hotmail.com> wrote in message

news:G7Sv7.109845$aZ6.25371642@news1.rdc1.az.home.com...

Quote
> Every time I press enter in this field I get this aggravating bell sound.
> I've searched through the associated code, and don't see anything that
> should be causing it. Anyone seen this before? Any ideas how to stop it?

On keypress event:

if key=#13 then key := #0;

Quote

> Thanks,
>    Donald Mullican

Re:Bell sound when pressing enter in a TEdit field


Ah, thank you :)

Donald Mullican

Quote
"AlanGLLoyd" <alangll...@aol.com> wrote in message

news:20011007033242.29789.00000416@nso-fd.aol.com...
Quote
> In article <2ZSv7.110108$aZ6.25423...@news1.rdc1.az.home.com>, "Donald
> Mullican" <dtmulli...@hotmail.com> writes:

> >But I do use it. I test for it in KeyPressed to determine when to send
the
> >string.

> _After_ you've tested it _then_ set it to #0.

> The key is passed to OnKeyPress to enable you to test/change it (as a
"var"
> parameter). After that it is passed to windows, which dings you if it does
not
> recognise the key as a useful one.

> Alan Lloyd
> alangll...@aol.com

Re:Bell sound when pressing enter in a TEdit field


I used to have a similar problem in many apps, not just delphi ones.  My son
helped me stumble onto the solution....If I brougth up the audio properties
windows dialog box and muted the microphone input device, the sounds went
away. Not sure why, but glad they are gone!
-D
Quote
"Donald Mullican" <dtmulli...@hotmail.com> wrote in message

news:G7Sv7.109845$aZ6.25371642@news1.rdc1.az.home.com...
Quote
> Every time I press enter in this field I get this aggravating bell sound.
> I've searched through the associated code, and don't see anything that
> should be causing it. Anyone seen this before? Any ideas how to stop it?

> Thanks,
>    Donald Mullican

Other Threads