Xbasic
UI_BEEP Function
Syntax
N UI_BEEP([N ui_beep_style])
Arguments
- ui_beep_style
Optional. Determines which system beep is played.
- Beep Style Code
- Description
- UI_STANDARD_BEEP
Standard Beep
- UI_SYSTEM_BEEP
System Beep
- UI_CRITICAL_BEEP
Critical Stop
- UI_QUESTION_BEEP
Question
- UI_EXCLAMATION_BEEP
Exclamation
- UI_ASTERISK_BEEP
Asterisk
Description
UI_BEEP() plays a system beep sound through your computer's speaker. Sounds are attached to the various types of system beeps through the Windows Control Panel.
Example
This function beeps the specified number of times.
function beep_a_lot(beep_num as N) for i = 1 to beep_num ui_beep() sleep(1) next i end function
Prompts the user for a password and beeps if the password is incorrect.
password = "Alpha5" entered = ui_get_text("Password", "Enter the password", "******", " ") if (entered = "") then end end if if entered == password then ui_msg_box("Password","Accepted.") else ui_beep() ui_msg_box("Password", "Password invalid.") end end if
Limitations
Desktop applications only.
See Also