WebBrowser.Stop Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Cancels any pending navigation and stops any dynamic page elements, such as background sounds and animations.
public:
void Stop();
public void Stop ();
member this.Stop : unit -> unit
Public Sub Stop ()
Examples
The following code example demonstrates how to use the Stop method to implement a Stop button for the WebBrowser control similar to the one in Internet Explorer. This example requires that your form contains a WebBrowser control called webBrowser1
and a Button control called ButtonStop
.
For the complete code example, see 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
Remarks
You can use the Stop method to implement a Stop button that is similar to the one on the Internet Explorer File menu.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om