Solved

Api beep function

Posted on 2001-06-30
3
328 Views
Last Modified: 2010-04-06
How can i hook a beep function which some application executes and disable her;
0
Comment
Question by:f15iaf
3 Comments
 
LVL 3

Expert Comment

by:sburck
ID: 6241413
The function MessageBeep allows you to make the system beeps.  It is an API function, available to any application, Delphi or otherwise.
0
 
LVL 17

Accepted Solution

by:
inthe earned 100 total points
ID: 6241725
if you want to hook an api call you will need madshis madcodehook library and to read all you can from here:
http://help.madshi.net/Data/madCodeHook.htm

or you can look at JclPeImage from the jcl :
http://www.delphi-jedi.org/Jedi:CODELIBJCL:90332

the above is not for the faint of heart maybe easier to cut the wire to the speaker ;-)

instead of hooking his may work ok for you instead :

procedure TForm1.Button1Click(Sender: TObject);
begin //disable beep
SystemParametersInfo(SPI_SETBEEP, Word(False), nil, 0);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin  //enable beep
SystemParametersInfo(SPI_SETBEEP, Word(true), nil, 0);
end;
0
 

Expert Comment

by:bengore
ID: 6244110
Last week I read a note about hooking the PC speaker beep.
But I can not remember the details. Try to search for the sensapi.(?)
http://msdn.microsoft.com/library/en-us/synchro/hh/zaw/sensport_1jxh.asp
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

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…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 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

17 Experts available now in Live!

Get 1:1 Help Now