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 source audio pour ce SoundPlayer a été défini.
public:
event EventHandler ^ SoundLocationChanged;
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 gestionnaire d’événements OnSoundLocationChanged pour recevoir une notification lorsque le 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 d’accès de source audio pour ce SoundPlayer a été défini.
Pour plus d’informations sur la façon de gérer les événements, consultez gestion et déclenchement d’événements.
S’applique à
Voir aussi
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour