SetBeep Function (Logic) | |
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.21
Syntax FUNCTION SetBeep(
lNewSetting AS LOGIC
) AS LOGIC
public static bool SetBeep(
bool lNewSetting
)
Request Example
View SourceParameters
- 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:
1IF SetBeep()
2 MessageBeep(MB_OK)
3 SetBeep(FALSE)
4 ? "No more beeping on errors from now on!"
5ENDIF
See Also