Solved

Stop that beep!

Posted on 1997-04-21
2
320 Views
Last Modified: 2010-04-04
How do I keep an edit box from beeping when the enter key is pressed?
0
Comment
Question by:sleach
2 Comments
 
LVL 2

Accepted Solution

by:
javiertb earned 50 total points
Comment Utility
You have to write a handler for the OnKeyPress event to do what you what with the pressed key and the in the Edit box keypress event do the following:

procedure TForm1.EditKeyPress(Sender: TObject; var Key: Char);
begin
   if key=#13 then // if Return key pressed
      key:=#0;
   inherited KeyPress(Sender,Key)  // your new handler
end;
0
 
LVL 1

Author Comment

by:sleach
Comment Utility
Thank you
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now