Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Api beep function

Posted on 2001-06-30
3
Medium Priority
?
336 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
[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
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 400 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

722 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