Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Win Api Beep()

Win Api Beep()

Win Api Beep()

This is a simple, but probably very difficult-to-answer, question.

When you get an error message in windows... lets say you typed "blah" into the 'run' dialog, you will hear a nice PC beep.

When *i* try to make a BEEP it sounds WRONG! What frequency is windows using for their error message BEEPS?


RE: Win Api Beep()

Try MessageBeep instead

RE: Win Api Beep()

  Or for a little more variety in the sound you can play, try PlaySound function.

RE: Win Api Beep()

Or plain Beep ...

Private Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long

Private Sub Command1_Click()
    sound 37, 100
End Sub

Private Sub sound(hz, duration)
        Beep hz, duration
End Sub

RE: Win Api Beep()

Beep is where we started ...

RE: Win Api Beep()

Please excuse my Beep.

RE: Win Api Beep()

=beep(442,100) is the very similar, if not, the default system beep.  Thanks to a few colleagues of mine, one who has a very enthusiastic interest in music.


RE: Win Api Beep()

MessageBeep(-1) should use the correct default beep, and will even use the PC speaker to do the beep if no soundcard installed/detected

RE: Win Api Beep()

HA! You're correct! I have no speakers but there are drivers installed for the speakers... so i being played but through non-existant speakers. CHEERS


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close