Interaction.Beep 方法

定义

通过计算机扬声器提示音。Sounds a tone through the computer's speaker.

public:
 static void Beep();
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static void Beep ();
public static void Beep ();
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member Beep : unit -> unit
static member Beep : unit -> unit
Public Sub Beep ()
属性

示例

此示例使用 Beep 函数通过计算机的扬声器发出音调。This example uses the Beep function to sound a tone through the computer's speaker.

' Sound a tone.
Beep()

注解

嘟嘟声的音调和持续时间取决于您的硬件和系统软件,因此在不同的计算机之间有所不同。The pitch and duration of the beep depend on your hardware and system software and therefore vary among computers.

备注

Beep函数要求在 UIPermission SafeTopLevelWindows 级别,这可能会影响在部分信任情况下的执行。The Beep function requires UIPermission at the SafeTopLevelWindows level, which may affect its execution in partial-trust situations. 有关详细信息,请参阅 UIPermissionFor more information, see UIPermission.

适用于