How to show Upload progress?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Swan
    New Member
    • Mar 2008
    • 27

    How to show Upload progress?

    Can anyone plz tell me,I have OCX created Http upload control.In that I am sending chunk wise data.Everything is working fine.My question is-how can I show Upload progress or Uploading cancelled,using raiseEvent method.
    I am sending my code whatever I tried-

    (When I run the code file uploaded successfully,bu t I can not see the progess,how much bytes are uploaded)
    [code=vb]
    Public Enum TransferProcess es
    TransferProcess _Upload = 0
    End Enum

    'Events of control
    Public Event UploadProgress( ByVal bytesTransfered As Long, ByVal totalBytes As Long, transferProcess As TransferProcess es)
    Public Event UploadComplete( )
    Public Event UploadCancelled ()
    Public Event UploadError(ByV al errNumber As Integer, ByVal errString As String, ByVal httpErrNumber As Long, ByVal httpErrString As String)

    BytesUploaded = BytesUploaded + BUFFER_SIZE
    RaiseEvent UploadProgress( BytesUploaded, lData, TransferProcess _Upload)
    [/code]
    Last edited by Dököll; May 11 '08, 05:31 AM. Reason: [code=vb]
  • Dököll
    Recognized Expert Top Contributor
    • Nov 2006
    • 2379

    #2
    Originally posted by Swan
    Can anyone plz tell me,I have OCX created Http upload control.In that I am sending chunk wise data.Everything is working fine.My question is-how can I show Upload progress or Uploading cancelled,using raiseEvent method.
    I am sending my code whatever I tried-

    (When I run the code file uploaded successfully,bu t I can not see the progess,how much bytes are uploaded)
    [code=vb]
    Public Enum TransferProcess es
    TransferProcess _Upload = 0
    End Enum

    'Events of control
    Public Event UploadProgress( ByVal bytesTransfered As Long, ByVal totalBytes As Long, transferProcess As TransferProcess es)
    Public Event UploadComplete( )
    Public Event UploadCancelled ()
    Public Event UploadError(ByV al errNumber As Integer, ByVal errString As String, ByVal httpErrNumber As Long, ByVal httpErrString As String)

    BytesUploaded = BytesUploaded + BUFFER_SIZE
    RaiseEvent UploadProgress( BytesUploaded, lData, TransferProcess _Upload)
    [/code]
    Hey there Swan!

    Is this the whole code? Please add everything just oin case someone is passing through does not have the time to rework your idea;-)

    Please stay tuned!

    Comment

    Working...