Solved

Stop that beep!

Posted on 1997-04-21
2
342 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

732 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