Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

beep vs. beep(100,100)

Posted on 2000-02-27
3
Medium Priority
?
269 Views
Last Modified: 2010-04-04
There seem to be 2 beeps in Delphi 4.  Sometimes I have access to one function and not the other.  What are the exact circumstances/unit uses that I need to have to control which version of beep I get.  Could I potentially be able to have access to both version of beep in the same unit?

thanks
0
Comment
Question by:abulka
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
ahalya earned 200 total points
ID: 2563443
yes, you can use both.

One is coming from Windows.pas (& finally from kernel32.dll) & the otherone from SysUtils.pas (& finally from User32.dll).  


you can call like this to select the one you prefer:

sysutils.beep;
windows.beep(100, 100);

0
 
LVL 7

Expert Comment

by:ahalya
ID: 2563453
and btw, if you don't qualify the function name with the unit, then the order in which you define units in the uses clause becomes critical.


e.g:


uses Windows, sysUtils;

beep; //<---- comes from sys utils.



uses SysUtils, Windows;

beep(10, 10); //<---- comes from windows.
0
 
LVL 6

Expert Comment

by:DrDelphi
ID: 2563636
Of note:

Windows.Beep ignores the duration in Windows 95/98.
0

Featured Post

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

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

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
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…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Integration Management Part 2
Suggested Courses

885 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