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

x
?
Solved

beep vs. beep(100,100)

Posted on 2000-02-27
3
Medium Priority
?
258 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 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

670 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