CancelDownload

Description

Cancels the download progress of the file.

Applies to

WebBrowser control

Syntax

controlname.CancelDownload ( integer ItemId )

Argument

Description

controlname

The name of the WebBrowser control.

ItemId

The ID used to identify the file. The minimum value is 1.

ItemId should be the return value of DownloadingStart or DownloadingStateChanged event.


Return value

Integer.

  • 1 -- Success.

  • -2 -- Failed to get the browser instance.

  • -6 -- The specified download task does not exist.

Examples

Integer li_rtn, li_itemid
li_rtn = wb_1.CancelDownload(li_itemid)

See also

EvaluateJavascriptAsync

EvaluateJavascriptSync

GetSource

GoBack

GoForward

Navigate

PauseDownload

PrintAsPDF

RegisterEvent

ResumeDownload

Refresh

StopNavigation

UnregisterEvent

Zoom