HtmlDocument.Stop 事件  
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
当向其他网页的导航被中断时发生。
public:
 event System::Windows::Forms::HtmlElementEventHandler ^ Stop;public event System.Windows.Forms.HtmlElementEventHandler Stop;public event System.Windows.Forms.HtmlElementEventHandler? Stop;member this.Stop : System.Windows.Forms.HtmlElementEventHandler Public Custom Event Stop As HtmlElementEventHandler 事件类型
示例
以下代码示例在事件发生时Stop重置Windows 窗体应用程序的状态栏。 该代码示例要求在应用程序中具有 StatusBar 名为 的 StatusBar1 控件。
ContextMenuStrip menuStrip = null;
public void DetectContextMenu()
{
    if (webBrowser1.Document != null)
    {
        webBrowser1.Document.ContextMenuShowing += new HtmlElementEventHandler(Document_ContextMenuShowing);
        menuStrip = new ContextMenuStrip();
        menuStrip.Items.Add("&Custom menu item...");
    }
}
void Document_ContextMenuShowing(object sender, HtmlElementEventArgs e)
{
    menuStrip.Show(e.MousePosition);
    e.ReturnValue = false;
}
注解
如果程序代码调用 控件的 方法, Stop 则网页加载 WebBrowser 将停止。 网络中断或网站故障导致的导航故障不会发生 Stop 。
有关处理事件的详细信息,请参阅 处理和引发事件。