HtmlElementErrorEventArgsとは? わかりやすく解説

HtmlElementErrorEventArgs クラス

メモ : このクラスは、.NET Framework version 2.0 で新しく追加されたものです。

Error イベントのデータを提供します。

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Public NotInheritable Class
 HtmlElementErrorEventArgs
    Inherits EventArgs
Dim instance As HtmlElementErrorEventArgs
public sealed class HtmlElementErrorEventArgs
 : EventArgs
public ref class HtmlElementErrorEventArgs
 sealed : public EventArgs
public final class HtmlElementErrorEventArgs
 extends EventArgs
public final class HtmlElementErrorEventArgs
 extends EventArgs
使用例使用例

スクリプト エラーの表示を抑制し、カスタム ダイアログ ボックスを表示する方法を次のコード例に示します。このコード例では、アプリケーションが webBrowser1 という名前の WebBrowser コントロールをホストしている必要があります。

Dim WithEvents ScriptWindow As
 HtmlWindow

Private Sub SuppressScriptErrors()
    If (Not (WebBrowser1.Document Is
 Nothing)) Then
        ScriptWindow = WebBrowser1.Document.Window
    End If
End Sub

Private Sub ScriptWindow_Error(ByVal
 sender As Object, ByVal
 e As HtmlElementErrorEventArgs) Handles ScriptWindow.Error
    MessageBox.Show("Suppressed error!")
    e.Handled = True
End Sub
private void SuppressScriptErrors()
{
    if (webBrowser1.Document != null)
    {
        webBrowser1.Document.Window.Error += new HtmlElementErrorEventHandler(scriptWindow_Error);
    }
}

private void  scriptWindow_Error(object sender,
 HtmlElementErrorEventArgs e)
{
     MessageBox.Show("Suppressed error!");
    e.Handled = true;
}
継承階層継承階層
System.Object
   System.EventArgs
    System.Windows.Forms.HtmlElementErrorEventArgs
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

HtmlElementErrorEventArgs プロパティ


HtmlElementErrorEventArgs メソッド


HtmlElementErrorEventArgs メンバ

Error イベントのデータを提供します。

HtmlElementErrorEventArgs データ型で公開されるメンバを以下の表に示します。


パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

HtmlElementErrorEventArgs クラス
System.Windows.Forms 名前空間
Error



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「HtmlElementErrorEventArgs」の関連用語

HtmlElementErrorEventArgsのお隣キーワード

   

英語⇒日本語
日本語⇒英語
   



HtmlElementErrorEventArgsのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS