I have a progress bar and a web browser, I want the progress bar to show the progress of the browser, how do i do it? Plz help me, I'll give u credit. thank u
Printable View
I have a progress bar and a web browser, I want the progress bar to show the progress of the browser, how do i do it? Plz help me, I'll give u credit. thank u
Basically you have to get the size of all the graphics files and the HTML file, add them all up and then calculate the difference between what you have already downloaded.
The basic answer is.... you can't do it!!
Why?
Because Internet Explorer AND Netscape can't do it.
How do you know how long a HTML file is when you are loading it? It might come from a script that is continually passing HTML until some time it decides to do the end tag.
Its just a weakness of the HTTP protocol that the internet is based on
do you mean with the webcontrol for vb is so let me look it up i have the code some where in my head .
hope this is what you wantCode:Private Sub WebBrowser1_ProgressChange(ByVal Progress As Long, ByVal ProgressMax As Long)
ProgressBar1.Max = ProgressMax
ProgressBar1.Min = 0
ProgressBar1.Value = Progress
End Sub
Why can't it be done? You can't do it without the webbrowser control, but you can do it.
Without a progressbar:
With a progressbar:Code:Private Sub WebBrowser1_ProgressChange(ByVal Progress As Long, ByVal ProgressMax As Long)
Label2.Caption = "Reading - " & Progress & " of " & ProgressMax & " bytes"
End Sub
Code:Private Sub WebBrowser1_ProgressChange(ByVal Progress As Long, ByVal ProgressMax As Long)
On Error Resume Next
Progressbar1.Min = 0
Progressbar1.Max = ProgressMax
Progressbar1.Value = Progress
End Sub
Doesn't that just give you the progress of the HTML page itself?
I didn't realise it included all the graphics as well which I would assume is part of the progress of downloading the page.
yeah it gives the whole page progress images and all
Bob- it didn't work, the program showed that:
ProgressBar1.Max = ProgressMax
was wrong
and Mathew Gates -- it worked at first, but now its, now..
hehe thats strange, any ideas?
Explain more, I have no clue as to what you just said.
Only one t? In Matthew!? It's not possible! I AM MATTHEW GATES. That is two Ts.
Copy the above info into your head so the next time you see me, you can say, "Hi Matthew Gates....with two Ts." :)
[Edited by Matthew Gates on 07-17-2000 at 07:30 PM]
okay, maTThew .. it worked the first time i tried it, but now when i try it , it doesn't work! :P
OKay nevermind i got it!! :P
[quote]I AM MATTEW GATES[quote]
I though you were Matthew Gates... :)
//Anders
Hehe...mispelled my own name..stupid keyboard.
MATTHEW is how it is spelled. Always spelled with two t's and never forget to leave out any letter like I did which is now changed :). Thank you.