WebBrowser.Stop Méthode

Définition

Annule toute navigation en attente et arrête tous les éléments de page dynamique, tels que les fonds sonores et les animations.

public:
 void Stop();
public void Stop ();
member this.Stop : unit -> unit
Public Sub Stop ()

Exemples

L’exemple de code suivant montre comment utiliser la Stop méthode pour implémenter un bouton Arrêter pour le WebBrowser contrôle similaire à celui dans Internet Explorer. Cet exemple nécessite que votre formulaire contienne un WebBrowser contrôle appelé webBrowser1 et un Button contrôle appelé ButtonStop.

Pour obtenir l’exemple de code complet, consultez How to: Add Web Browser Capabilities to a Windows Forms Application.

// Halts the current navigation and any sounds or animations on 
// the page.
void ButtonStop_Click( System::Object^ /*sender*/, System::EventArgs^ /*e*/ )
{
   this->WebBrowser1->Stop();
}
// Halts the current navigation and any sounds or animations on 
// the page.
private void stopButton_Click(object sender, EventArgs e)
{
    webBrowser1.Stop();
}
' Halts the current navigation and any sounds or animations on 
' the page.
Private Sub stopButton_Click( _
    ByVal sender As Object, ByVal e As EventArgs) _
    Handles stopButton.Click

    webBrowser1.Stop()

End Sub

Remarques

Vous pouvez utiliser la Stop méthode pour implémenter un bouton Arrêter similaire à celui du menu Fichier d’Internet Explorer.

S’applique à

Voir aussi