Click or drag to resize

SetBeep Function (Logic)

X#
Return and optionally change the setting that determines whether a beep is sounded by the error system when an error occurs.

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax
 FUNCTION SetBeep(
	lNewSetting AS LOGIC
) AS LOGIC
Request Example View Source

Parameters

lNewSetting
Type: Logic
TRUE turns beeping on; FALSE turns it off.
If the Beep entry in the Windows section of WIN.INI is not present or is set to yes, the initial default is TRUE; if this entry is set to no, the initial default is FALSE.

Return Value

Type: Logic
If lNewSetting is not specified, SetBeep() returns the current setting.
If lNewSetting is specified, the previous setting is returned.
Remarks
Examples
This example shuts off the error beep if it is on:
X#
1IF SetBeep()
2    MessageBeep(MB_OK)
3    SetBeep(FALSE)
4    ? "No more beeping on errors from now on!"
5ENDIF
See Also