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

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.
iflashAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

EDDYKTCommented:
0
Shahid ThaikaSole ProprietorCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Shahid ThaikaSole ProprietorCommented:
I am with the decision :). We both did our bit to help out. But the author did not reply.
0
iflashAuthor Commented:
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
Shahid ThaikaSole ProprietorCommented:
Thank You. But I still don't mind answering any question you may have. But please be more specific.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.