語言

SystemSounds.Beep 屬性

定義

取得目前 Windows 音效方案中與 Beep 程式事件相關的聲音。

public:
 static property System::Media::SystemSound ^ Beep { System::Media::SystemSound ^ get(); };
public static System.Media.SystemSound Beep { get; }
static member Beep : System.Media.SystemSound
Public Shared ReadOnly Property Beep As SystemSound

屬性值

這是 SystemSound 與 Beep 目前 Windows 音效方案中程式事件相關的。

範例

以下程式碼範例示範了該 Beep 屬性的使用方式。

// Plays the sound associated with the Beep system event.
SystemSounds::Beep->Play();
// Plays the sound associated with the Beep system event.
SystemSounds.Beep.Play();
' Plays the sound associated with the Beep system event.
SystemSounds.Beep.Play()

備註

在 Windows Server 2022 中,工作排程器的 Microsoft\Windows\Multimedia\SystemSoundsService 任務被停用。 此任務與 Windows Audio 服務都必須啟用,SystemSounds.Beep.Play() 才能正常運作。

適用於

另請參閱