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

プロパティ値

現在の Windows サウンド スキームのSystemSound プログラム イベントに関連付けられているBeep

次のコード例では、 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 タスクが無効になります。 SystemSounds.Beep.Play() が正常に機能するためには、このタスクと Windows Audio サービスの両方を有効にする必要があります。

適用対象

こちらもご覧ください