By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,116 Members | 1,509 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,116 IT Pros & Developers. It's quick & easy.

How to show Upload progress?

P: 27
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,but I can not see the progess,how much bytes are uploaded)
Expand|Select|Wrap|Line Numbers
  1. Public Enum TransferProcesses
  2.     TransferProcess_Upload = 0
  3. End Enum
  4.  
  5. 'Events of control
  6. Public Event UploadProgress(ByVal bytesTransfered As Long, ByVal totalBytes As Long, transferProcess As TransferProcesses)
  7. Public Event UploadComplete()
  8. Public Event UploadCancelled()
  9. Public Event UploadError(ByVal errNumber As Integer, ByVal errString As String, ByVal httpErrNumber As Long, ByVal httpErrString As String)
  10.  
  11. BytesUploaded = BytesUploaded + BUFFER_SIZE
  12.         RaiseEvent UploadProgress(BytesUploaded, lData, TransferProcess_Upload)
  13.  
May 6 '08 #1
Share this Question
Share on Google+
1 Reply


Dököll
Expert 100+
P: 2,364
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,but I can not see the progess,how much bytes are uploaded)
Expand|Select|Wrap|Line Numbers
  1. Public Enum TransferProcesses
  2.     TransferProcess_Upload = 0
  3. End Enum
  4.  
  5. 'Events of control
  6. Public Event UploadProgress(ByVal bytesTransfered As Long, ByVal totalBytes As Long, transferProcess As TransferProcesses)
  7. Public Event UploadComplete()
  8. Public Event UploadCancelled()
  9. Public Event UploadError(ByVal errNumber As Integer, ByVal errString As String, ByVal httpErrNumber As Long, ByVal httpErrString As String)
  10.  
  11. BytesUploaded = BytesUploaded + BUFFER_SIZE
  12.         RaiseEvent UploadProgress(BytesUploaded, lData, TransferProcess_Upload)
  13.  
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!
May 11 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.