Solved

beep vs. beep(100,100)

Posted on 2000-02-27
3
246 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
[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
3 Comments
 
LVL 7

Accepted Solution

by:
ahalya earned 50 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

Independent Software Vendors: 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…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

752 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