HtmlElementErrorEventArgs Class

 

Provides data for the Error event.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

System.Object
  System.EventArgs
    System.Windows.Forms.HtmlElementErrorEventArgs

Public NotInheritable Class HtmlElementErrorEventArgs
	Inherits EventArgs

NameDescription
System_CAPS_pubpropertyDescription

Gets the descriptive string corresponding to the error.

System_CAPS_pubpropertyHandled

Gets or sets whether this error has been handled by the application hosting the document.

System_CAPS_pubpropertyLineNumber

Gets the line of HTML script code on which the error occurred.

System_CAPS_pubpropertyUrl

Gets the location of the document that generated the error.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

The following code example demonstrates how to suppress a script error and display your own custom dialog box. This code example requires that your application host a WebBrowser control named webBrowser1.

Dim WithEvents ScriptWindow As HtmlWindow

Private Sub SuppressScriptErrors()
    If (WebBrowser1.Document IsNot 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

.NET Framework
Available since 2.0

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: