Results 1 to 3 of 3

Thread: How to use the Progress Bar?

  1. #1
    Guest

    Post

    Hello,

    I am about to develop a backing up program and would like to know how to use and configure the 'Progress Bar'

    Any tutorial or advise would be greatly appreciated.

    Thanks

    ------------------
    Robert Culver
    IT Student
    E-mail - [email protected]
    Web Page - http://www.visual-basic.org.uk

  2. #2
    Member
    Join Date
    Jan 1999
    Location
    Longmont,CO
    Posts
    53

    Post

    It's easy. You just indicate to the progress bar how far along you are in your code (0-100). Depending on what you're doing, you can set it manually like this:

    pbarMine.Value = 50 'we're 50% done

    Or, if you're doing something in a loop, you can update the progress bar every iteration:

    For i = 1 to 10
    Call SomeSub
    pbar.Value = i*10 'so 1 = 10%, 2 = 20%, etc.
    Next i

  3. #3
    Member
    Join Date
    Jan 2000
    Location
    Launceston, Tasmania, Australia
    Posts
    44

    Post

    when I use it, I usually put a code like so in a timer:

    progressbar1.value = progressbar1.value + 1

    and just increase the timers interval to make it go slower and incress the + 1 to make it go faster.

    and if i had it on a splash screen the timers sub would probably look like this.

    Private Sub Timer1_Timer()
    progressbar1.value = progressbar1.value + 5
    if progressbar1.value = 50 then 'see if its at 50%
    load frmmain 'load main form to memory
    end if
    if progressbar1.value = 100 then 'check if its at 100%
    frmmain.show
    end if
    end sub



    ------------------
    Mooose

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