Board index » delphi » TEdit, Beep with some keystrokes

TEdit, Beep with some keystrokes

Hi,

If you write into e TEdit- or TMaskEdit-field at runtime, there comes a
beep with many (I think forbidden) keystrokes. E.g. Ctrl-Y, ENTER,...

Is it possible to switch that of somehow ?
Is this possible without capturing windows-messages ?

Uwe Labs.

 

Re:TEdit, Beep with some keystrokes


Hi.

Quote
>If you write into e TEdit- or TMaskEdit-field at runtime, there comes a
>beep with many (I think forbidden) keystrokes. E.g. Ctrl-Y, ENTER,...

>Is it possible to switch that of somehow ?
>Is this possible without capturing windows-messages ?

Try assigning 0 to the Key variable in Edit's OnKey[Press] events after
you're done working with it.

Bye.
/lexi

Re:TEdit, Beep with some keystrokes


It's very easy in fact.

Use the OnKeyPress event and write something like:

if key=#13 then key:=#0

in the body of the procedure. This example removes the beep from <ENTER>
You can set up SET's of CHAR's that are legal in this particular TEdit-field
and let everything else equal to key:=#0

regards

Samps

Quote
"Uwe Labs" <Uwe.L...@lehrer1.rz.uni-karlsruhe.de> wrote in message

news:388F38D6.8903936D@lehrer1.rz.uni-karlsruhe.de...
Quote
> Hi,

> If you write into e TEdit- or TMaskEdit-field at runtime, there comes a
> beep with many (I think forbidden) keystrokes. E.g. Ctrl-Y, ENTER,...

> Is it possible to switch that of somehow ?
> Is this possible without capturing windows-messages ?

> Uwe Labs.

Other Threads