mobileFX WebKitX CEF3 ActiveX 4.x
WebKitXCEF3Lib ActiveX Control / WebKitXCEF3 Object / OnDownloadUpdated Event

Download identifier, a unique integer number of the downloaded resource.

The resulting (possibly redirected) URL of the resource being downloaded.

The original URL of the resource being downloaded.

The MIME type of the resource being downloaded.

The path of the local file to save the resource being downloaded.

The suggested local file name of the resource being downloaded.

The total size in bytes of the resource being downloaded.

The bytes received so far for the resource being downloaded.

The progress percentage so far for the resource being downloaded.

A long indicating the MB / sec for the resource being downloaded.

By setting this argument to True you can cancel the download of the resource.

In This Topic
    OnDownloadUpdated Event
    In This Topic
    Description

    Fired while a resource is being downloaded. Resource download is initiated by Download method.

    Syntax
    Visual Basic
    Public Event OnDownloadUpdated( _
       ByVal Id As Long, _
       ByVal url As String, _
       ByVal OriginalUrl As String, _
       ByVal MimeType As String, _
       ByVal FullPath As String, _
       ByVal SuggestedFileName As String, _
       ByVal TotalBytes As Long, _
       ByVal ReceivedBytes As Long, _
       ByVal PercentComplete As Long, _
       ByVal CurrentSpeed As Long, _
       ByRef Cancel As Boolean _
    )
    Parameters
    Id

    Download identifier, a unique integer number of the downloaded resource.

    url

    The resulting (possibly redirected) URL of the resource being downloaded.

    OriginalUrl

    The original URL of the resource being downloaded.

    MimeType

    The MIME type of the resource being downloaded.

    FullPath

    The path of the local file to save the resource being downloaded.

    SuggestedFileName

    The suggested local file name of the resource being downloaded.

    TotalBytes

    The total size in bytes of the resource being downloaded.

    ReceivedBytes

    The bytes received so far for the resource being downloaded.

    PercentComplete

    The progress percentage so far for the resource being downloaded.

    CurrentSpeed

    A long indicating the MB / sec for the resource being downloaded.

    Cancel

    By setting this argument to True you can cancel the download of the resource.

    Remarks

    Purpose of this event is to provide a chance to Cancel the download and monitor the progress.

    Resource download is initiated by Download method.

    Example
    Private Sub WebKitX1_OnDownloadUpdated(ByVal ID As Long, ByVal URL As String, ByVal OriginalUrl As String, ByVal MimeType As String, ByVal FullPath As String, ByVal SuggestedFileName As String, ByVal TotalBytes As Long, ByVal ReceivedBytes As Long, ByVal PercentComplete As Long, ByVal CurrentSpeed As Long, Cancel As Boolean)
        On Error Resume Next
        AddLog "OnDownloadUpdated " & Join(Array(ID, CurrentSpeed, TotalBytes, ReceivedBytes, PercentComplete), ", ")
        'If PercentComplete > 80 Then
        '    Cancel = True
        'End If
    End Sub
    private void WebKitXCEF31_OnDownloadUpdated(object sender, AxWebKitXCEF3Lib._DWebKitXCEF3Events_OnDownloadUpdatedEvent e)
    {
        AddLog("OnDownloadUpdated " + e.iD + ", " + e.currentSpeed + ", " + e.totalBytes + ", " + e.receivedBytes + ", " + e.percentComplete);
    }
    See Also