SoundPlayer.SoundLocationChanged Événement
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Se produit lorsqu’un nouveau chemin de source audio pour ce SoundPlayer paramètre a été défini.
public:
event EventHandler ^ SoundLocationChanged;
public event EventHandler SoundLocationChanged;
member this.SoundLocationChanged : EventHandler
Public Custom Event SoundLocationChanged As EventHandler
Type d'événement
Exemples
L’exemple de code suivant illustre l’utilisation du OnSoundLocationChanged gestionnaire d’événements pour recevoir une notification lorsque celui-ci SoundPlayer a été attaché à un autre fichier .wav. Cet exemple de code fait partie d’un exemple plus grand fourni pour la SoundPlayer classe.
// 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
Remarques
Cet événement est déclenché lorsqu’un nouveau chemin de source audio pour celui-ci SoundPlayer a été défini.
Pour plus d’informations sur la gestion des événements, consultez Gestion et déclenchement d’événements.