Results 1 to 12 of 12

Thread: Progressbar

  1. #1
    Guest

    Cool

    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.

  2. #2
    Guest

    Cool

    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.

  3. #3
    Guest
    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

  4. #4
    Fanatic Member
    Join Date
    Jan 1999
    Location
    UK
    Posts
    554

    Lightbulb

    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
    {;->


  5. #5
    Addicted Member
    Join Date
    Mar 2000
    Location
    Gainesville, FL
    Posts
    131
    Or you could just draw something on a picture control.

  6. #6
    Guest

    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.

  7. #7
    Guest

    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.

  8. #8
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840
    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!)

  9. #9
    Guest

    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.

  10. #10
    Addicted Member
    Join Date
    Feb 2000
    Location
    London, UK
    Posts
    145
    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!)

  11. #11
    Guest

    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.

  12. #12
    Addicted Member
    Join Date
    Feb 2000
    Location
    London, UK
    Posts
    145

    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
  •  



Click Here to Expand Forum to Full Width