Link to home
Start Free TrialLog in
Avatar of llcoolmel
llcoolmel

asked on

WebBrowser progress and progress bar

vb6, ie4, win95

i' m trying to have the progress bar display how much of a webpage has been downloaded.  i read somewhere that i should multiply the "progress" by 100 and divide that by the "progressmax" UNLESS "progress = -1".  so i came up with the following code:

ProgressBar1.Value = (Progress * 100) \ ProgressMax

but i can't quite figure out how to type up the "unless progress = -1" part.  an explaination and code would be great.  thanx
Avatar of cyber_bandit
cyber_bandit

if progressbar1.value <> -1 then
     blah blah blah
 else
     blah blah blah
 end if
Avatar of llcoolmel

ASKER

but now i always get a "divide by zero" error or something similar.  if you can provide me with a full code that will show the progress of my webpage loading that works, i will award the points.  i have upped the points to 100.
I am not familiar with your web page loading code... I think the divide by zero error does not have anything to do with you progress bar though.  That error is due to some math function you have prior to the progress bar value setting.  I would imagine you are trying to figure out the Progressbar.value in the step before you update the actualy visual value.  take a look at that code and see if you can figure out the numbers in there. Appears something is not initialized.
ASKER CERTIFIED SOLUTION
Avatar of GETTYD
GETTYD

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
i appreciate the input, however, your step number 7...i'm still a novice programmer and i do not know how to use the input you gave me to solve my problem.  could you please give me a very specific code that won't give me that darn "divide by zero" or similar errors??

i will up the points to 200
Bought This Question.