Board index » delphi » TEdit Beeps when enter is pressed?

TEdit Beeps when enter is pressed?

I have a TEdit in a program of mine... When you've typed in the material and
hit enter, it sends the text to the server.  I do this by checking OnKeyPress
for a #13.

However, on computers where they've enabled beep on enter (or something like
that), it squawks when you're chatting.  And that gets REALLY annoying.  
Anyone have any fix for this?

J. Masters
T r e n t S o f t
www.trentsoft.com
tr...@circle.net

 

Re:TEdit Beeps when enter is pressed?


Quote
Trent wrote:

> I have a TEdit in a program of mine... When you've typed in the material and
> hit enter, it sends the text to the server.  I do this by checking OnKeyPress
> for a #13.

> However, on computers where they've enabled beep on enter (or something like
> that), it squawks when you're chatting.  And that gets REALLY annoying.
> Anyone have any fix for this?

> J. Masters
> T r e n t S o f t
> www.trentsoft.com
> tr...@circle.netAssign a null value to the key, something like this...

procedure Tmain.FormKeyPress(Sender: TObject; var Key: Char);
begin
if (key=#13)then
if not (activecontrol is tdbgrid) then
begin
key:=#0 ;
SelectNext(ActiveControl as TWinControl, True, True );
end;
end;
Ken Pegg
K...@netcomuk.co.uk

Other Threads