UnregisterEvent

Description

Unregisters the user defined event that is registered using the RegisterEvent function.

Applies to

WebBrowser control

Syntax

controlname.UnregisterEvent (string eventname) 

Argument

Description

controlname

The name of the WebBrowser control.

eventname

The name of the user-defined event to be unregistered.


Return value

Integer.

Returns 1 if it succeeds and -1 if an error occurs.

Examples

The following example triggers an unregistered event in JavaScript and returns an error:

Integer li_Return
String ls_JS, ls_Result, ls_Error

li_Return = wb_1.UnregisterEvent("ue_getstring")
If li_Return = 1 Then
 ls_JS = "function event1() { return window.webBrowser.ue_getstring('Hi,PB!');} event1();"
 wb_1.EvaluateJavascriptSync(ls_JS, ls_Result, ls_Error)
 If Len(ls_Error) > 0 Then
  MessageBox( "Error", ls_Error )
 End If
End If

See also

CancelDownload

EvaluateJavascriptAsync

EvaluateJavascriptSync

GetSource

GoBack

GoForward

Navigate

PrintAsPDF

PauseDownload

RegisterEvent

ResumeDownload

Refresh

StopNavigation

Zoom