Solved

Stop that beep!

Posted on 1997-04-21
2
334 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
ID: 1335603
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
ID: 1335604
Thank you
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

832 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