SoundPlayer.SoundLocationChanged イベント

定義

この SoundPlayer の新しいオーディオ ソース パスが設定されたときに発生します。

public:
 event EventHandler ^ SoundLocationChanged;
public event EventHandler SoundLocationChanged;
public event EventHandler? SoundLocationChanged;
member this.SoundLocationChanged : EventHandler 
Public Custom Event SoundLocationChanged As EventHandler 

イベントの種類

次のコード例では、 が別の OnSoundLocationChanged .wav ファイルにアタッチされている場合 SoundPlayer に、イベント ハンドラーを使用して通知を受信する方法を示します。 このコード例は、SoundPlayer クラスのために提供されている大規模な例の一部です。

// Handler for the SoundLocationChanged event.
void player_LocationChanged( Object^ /*sender*/, EventArgs^ /*e*/ )
{
   String^ message = String::Format( "SoundLocationChanged: {0}", player->SoundLocation );
   ReportStatus( message );
}
// Handler for the SoundLocationChanged event.
private void player_LocationChanged(object sender, EventArgs e)
{   
    string message = String.Format("SoundLocationChanged: {0}", 
        player.SoundLocation);
    ReportStatus(message);
}
' Handler for the SoundLocationChanged event.
Private Sub player_LocationChanged(ByVal sender As Object, _
    ByVal e As EventArgs)
    Dim message As String = [String].Format("SoundLocationChanged: {0}", _
        player.SoundLocation)
    ReportStatus(message)
End Sub

注釈

このイベントは、これに対 SoundPlayer する新しいオーディオ ソース パスが設定されている場合に発生します。

イベントを処理する方法の詳細については、次を参照してください。処理とイベントの発生します。

適用対象

こちらもご覧ください