|
-
Apr 30th, 2000, 02:30 AM
#1
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.
-
Apr 30th, 2000, 02:46 AM
#2
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.
-
Apr 30th, 2000, 05:05 AM
#3
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
-
Apr 30th, 2000, 05:43 AM
#4
Fanatic Member
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
{;->
-
Apr 30th, 2000, 05:59 AM
#5
Addicted Member
Or you could just draw something on a picture control.
-
Apr 30th, 2000, 06:08 AM
#6
check this out
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.
-
Apr 30th, 2000, 06:09 AM
#7
grrrr
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.
-
Apr 30th, 2000, 12:02 PM
#8
Fanatic Member
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]
Paul Dwyer 
Network Engineer
Aussie In Tokyo
Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)
-
Apr 30th, 2000, 12:32 PM
#9
testing url
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.
-
May 1st, 2000, 04:27 AM
#10
Addicted Member
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
Wilhelm Tunemyr,
Swede in London
[email protected]
"Dort, wo man Bücher verbrennt, verbrennt man am Ende auch Menschen"
Heinrich Heine (1797-1856)
Pravda vítezi!
(Truth prevails!)
-
May 1st, 2000, 05:48 AM
#11
thanks
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.
-
May 2nd, 2000, 09:50 PM
#12
Addicted Member
Not so slow
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
Wilhelm Tunemyr,
Swede in London
[email protected]
"Dort, wo man Bücher verbrennt, verbrennt man am Ende auch Menschen"
Heinrich Heine (1797-1856)
Pravda vítezi!
(Truth prevails!)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|