Interaction.Beep 方法

定義

透過電腦的喇叭發出聲音。

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 式透過電腦的喇叭來音效。

' Sound a tone.
Beep()

備註

擷取音調和持續時間取決於您的硬體與系統軟體,因此會因計算機而異。

注意

Beep式需要UIPermissionSafeTopLevelWindows層級,這可能會在部分信任的情況下影響其執行。 如需詳細資訊,請參閱UIPermission

適用於

另請參閱