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 

이벤트 유형

예제

다음 코드 예제에서는 다른 .wav 파일에 연결 된 경우 SoundPlayer 알림을 받을 이벤트 처리기를 사용 OnSoundLocationChanged 하는 방법을 보여 줍니다. 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 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 설정되었을 때 발생합니다.

이벤트를 처리 하는 방법에 대 한 자세한 내용은 참조 하세요. 이벤트 처리 및 발생합니다.

적용 대상

추가 정보