Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Progress Bar for URLDownloadtoFile Lib "urlmon" Alias "URLDownloadToFileA"

Posted on 2004-10-22
6
Medium Priority
?
2,526 Views
Last Modified: 2007-12-19
Hi all,

Im having trouble creating a download progress bar for the URLDownloadToFile function which uses the urlmon library.

For example.. in the following code, i wish to display a simple progress bar when I'm downloading a file using the URLDownloadToFile function:

------------------------------------------------------------
Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long

Private Sub Command1_Click()

Call URLDownloadToFile(0, "http://mysite.com/myfile.exe", App.Path & "myfile.exe", 0, 0)

' Show progress meter here... but I dont know how.. please HELP!

End Sub
--------------------------------------------------------------

Can anyone please help? it will be great if the progressbar is showed on the separate form, and then when download completes, the form would close/hide.

Thank you so much.
0
Comment
Question by:iflash
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
6 Comments
 
LVL 26

Assisted Solution

by:EDDYKT
EDDYKT earned 200 total points
ID: 12379660
0
 
LVL 9

Accepted Solution

by:
Shahid Thaika earned 800 total points
ID: 12379670
0
 
LVL 9

Expert Comment

by:Shahid Thaika
ID: 12591012
I am with the decision :). We both did our bit to help out. But the author did not reply.
0
 

Author Comment

by:iflash
ID: 12591019
Well there is still no obvious solution, but eeshahidt is the closest.. so i'll reward you with more points...

thanks for helping out guys.
0
 
LVL 9

Expert Comment

by:Shahid Thaika
ID: 12591845
Thank You. But I still don't mind answering any question you may have. But please be more specific.
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question