Hello there!
Is there a way how to make the progressbar change is color during is value increase, or progress like on the games, without increasing on squares.
If someone could help me,thanks.
Printable View
Hello there!
Is there a way how to make the progressbar change is color during is value increase, or progress like on the games, without increasing on squares.
If someone could help me,thanks.
Hello all,
Yes if somebody can show this, it shall be a great help with my new project. I am aiming to produce a backup program. The progress bar shall be excellent.
I don't think there is a way to do this with a standard progress bar control, and unless you want to buy a third party solution you can do the following.
Instead of using the progress bar control, make your own, using two text boxes right next to each other, one very small and one the size of the progress bar you want.
As you program is running you change the dimmentions of the text boxes, you can have a vertical progress bar if you want and the text boxes as you probably know can have all kinds of different background colors.
KO
Hi i guess short of creating your own progress bar you could always:
1 define an array of colors something like:
const mycolor1=vbred
const mycolor2=vbgreen
const mycolor3=vbblue
const mycolor4=vbviolet
etc
and then decide when you want it to change color, like for example, lets say i wanna change the color after every 1/4 (thats 25% of progress)
do a quick sum to see if the current value is divisable by 1/4 and if it is then change color
if int(gauge1.value /(gauge1.maxvalue/4)) then
'change to next color here
gauge1.forecolor=mycolor2
elseif
etc etc etc
Its not the neatest way but it gives you an idea that it can be changed.
PS
When i mean progress bar i mean the MicroHelp Gauge control
Find it in your c:\windows\system folder its called gauge32.ocx just browse over to it - in vb off course
DocZaf
{;->
Or you could just draw something on a picture control.
i just finished making my own OCX taht is a VERY accurate progress bar with way cooler effects than that default one, download it from here if you want it.
http://www.geocities.com/hdem2/Grad_ProgBar.zip
also reply and tell me if you like it. or if you need help using it i can tell you what to do.
this has happened before but my links dont work on this forum for some reason. anyways the link is correct but it will give you a 404 error if you click on in. once you click on it and when your browser opens, just take out the "http://" from the address bar and press enter so there will only be the "www" then it should work, if it doesn't then reply ill try to fix it.
try this
It doesn't work when I mod your link but I can get to it.
add ~ before hdem2 and it will work. if you write the link here with the ~ in it... it doesn't ???
so the link above will work with a "~" in it but not when I write it like that myself as a link from here !!
[Edited by Paul282 on 05-01-2000 at 01:08 AM]
www.geocities.com/hdem2/Grad_ProgBar.zip
this is a link to my progress bar control, im testing to see if this works... download it if you wish.
Well, the progress bar is working fine, but unfortunately it is quite slow.
I tested a few in an app (just a For-Next-loop, with an ordinary progressbar, a shape and yours), and it took quite a lot more time to use it. But else it's working fine!
Pentax
yeah it does go pretty slow on old computers, i dont know how old yours is but i tried it at my schools 486 and when the percent reached past 50%, the drawing wasn't instant anymore it took a second or 2 to draw the gradient. but i made it on my 400 mhz cpu and it is instant no matter what percent so i cant help it. but thanks for testing it out.
I tested it on a P-III 450 MHz, 128 Mb RAM, so I don't think that's the problem.
I was quick enough in the beginning, but after a while it went slower and slower.
Pentax