----- Original Message ----- From: "John Dammeyer" <jo...@autoartisans.com> To: "'Moderated List for the Discussion of Delphi ProgrammingexcludingDatabase-related topics'" <delphi@elists.org>
Sent: Thursday, August 18, 2011 4:55 AM Subject: Typing ENTER key in Tedit rings bell
I'm using a Tedit form for entering a string of characters. I want the ENTER key to call a button ONCLICK event. That all works. The problem is the ENTER key also rings the bell on Windows. How do I prevent the bell from ringing. I'm guessing it's because the ENTER key is considered an invalid input. How do I add the ENTER key to be a valid input so it doesn't bing the bell? Thanks John Automation Artisans Inc. http://www.autoartisans.com/ELS/ Ph. 1 250 544 4950
Hi, In Delphi 7 I have used following code: Set beeper OFF in MainFormOnCreate: SystemParametersInfo(SPI_SETBEEP, 0, nil, SPIF_SENDWININICHANGE); Set beeper ON in MainFormOnCloseQuery: SystemParametersInfo(SPI_SETBEEP, 1, nil, SPIF_SENDWININICHANGE); Regards, Erkki -- I am using the free version of SPAMfighter. We are a community of 7 million users fighting spam. SPAMfighter has removed 35355 of my spam emails to date. Get the free SPAMfighter here: http://www.spamfighter.com/len The Professional version does not have this message _______________________________________________ Delphi mailing list Delphi@elists.org http://lists.elists.org/cgi-bin/mailman/listinfo/delphi