Article ID: 110103
Article Last Modified on 11/18/2003
Parameter Value Meaning
---------------------------------------------------------------------------
-1 Produces a standard beep sound by using the computer
speaker.
MB_ICONASTERISK Plays the sound identified by the SystemAsterisk
entry in the [sounds] section of WIN.INI.
MB_ICONEXCLAMATION Plays the sound identified by the SystemExclamation
entry in the [sounds] section of WIN.INI.
MB_ICONHAND Plays the sound identified by the SystemHand
entry in the [sounds] section of WIN.INI.
MB_ICONQUESTION Plays the sound identified by the SystemQuestion
entry in the [sounds] section of WIN.INI.
MB_OK Plays the sound identified by the SystemDefault
entry in the [sounds] section of WIN.INI.
Sub Form_Load ()
Const MB_ICONQUESTION = 32 ' Warning query. See CONSTANTS.TXT.
Const MB_ICONEXCLAMATION = 48 ' Warning message.
Const MB_YESNO = 4 ' Yes and No buttons
MessageBeep MB_ICONEXCLAMATION ' Plays waveform sound.
MsgBox "Wow!", MB_ICONEXCLAMATION ' Displays message box.
MessageBeep MB_ICONQUESTION
MsgBox "Yes or No?", MB_ICONQUESTION + MB_YESNO
End
End Sub
NOTE: The MB_ICONQUESTION and MB_ICONEXCLAMATION values are the same for
both the MessageBeep API function and the MsgBox statement. See the
"Parameters for MsgBox Statement" section below.
Declare Sub MessageBeep Lib "User" (ByVal wType As Integer)
Default Beep
Exclamation
Windows Start
Windows Exit
Critical Stop
Question
Asterisk
Const MB_ICONSTOP = 16 ' Critical message; displays STOP icon. Const MB_ICONQUESTION = 32 ' Warning query; displays ? icon. Const MB_ICONEXCLAMATION = 48 ' Warning message; displays ! icon. Const MB_ICONINFORMATION = 64 ' Information message; displays i icon. Const MB_OK = 0 ' OK button only Const MB_OKCANCEL = 1 ' OK and Cancel buttons Const MB_ABORTRETRYIGNORE = 2 ' Abort, Retry, and Ignore buttons Const MB_YESNOCANCEL = 3 ' Yes, No, and Cancel buttons Const MB_YESNO = 4 ' Yes and No buttons Const MB_RETRYCANCEL = 5 ' Retry and Cancel buttons Const MB_APPLMODAL = 0 ' Application Modal Message Box Const MB_DEFBUTTON1 = 0 ' First button is default Const MB_DEFBUTTON2 = 256 ' Second button is default Const MB_DEFBUTTON3 = 512 ' Third button is default Const MB_SYSTEMMODAL = 4096 'System Modal
Additional query words: 3.00
Keywords: KB110103