Declare Function MessageBeep Lib "user32.dll" (ByVal wType As Long) As Long
Platforms: Win 32s, Win 95/98, Win NT
MessageBeep plays one of the system's associated sounds, with one exception. These sounds are some of the ones that Windows associates with certain events. However, this function can also play a beep on the computer's internal speaker. The function returns 1 if successful, or 0 if an error occured.
Example:
' Play the SystemQuestion sound.
Dim retval As Long ' return value
retval = MessageBeep(MB_ICONQUESTION) ' play the SystemQuestion sound
Related Call: Beep
Category: Errors
Back to the index.