Solved

beep vs. beep(100,100)

Posted on 2000-02-27
3
242 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 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

803 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