Wednesday, May 22, 2013
 
    Search Web Link
Search Software
    
API Home » System » Beep

Beep

Category: System
Hits: 4507 Rating: Beep has been rated 3.84 by  1048 users (3.84) votes 1048
Rate: 1-star  2-stars  3-stars  4-stars  5-stars
E-mail this API to friend E-mail this Code to a friend  save Bookmark this VB API Function
API Explanation
Beep plays a sound on the computer, but its behavior varies markedly between Win NT and Win 95/98. On Win NT, a tone is played in the specified frequency for a specified length of time. On Win 95/98, the function's two parameters are ignored completely and the function merely plays the SystemDefault sound. The function returns 1 if successful, or 0 if an error occured.

Parameter Information
Declare Function Beep Lib "kernel32.dll" (ByVal dwFreq As Long, _
ByVal dwDuration As Long) As Long

dwFreq
On Win NT, specifies the frequency, in hertz (Hz), of the tone to play. On Win 95/98, this parameter is ignored.
dwDuration
On Win NT, specifies the duration, in milliseconds, to play the desired tone. On Win 95/98, this parameter is ignored.
Code



'Attempt to play a note at 800 Hz for 2 seconds. This will only behave this way on Win NT; users of Win 95/98 will only hear the default sound.
Dim retval As Long ' return value
retval = Beep(800, 2000) ' on NT, a 800 Hz tone for 2 seconds





HOME | MUSIC | DOWNLOADS |  GAMES | TEST-QUIZZES | SITEMAP | ABOUT | HELP
Copyright © 2000 - 2013 Ex-designz. All rights reserved. Website Developed By Dexter Zafra of Myasp-net.com
Link to us | Advertisement | Contact us | Privacy Policy | Terms of use | Accessibility