Results 1 to 13 of 13

Thread: [RESOLVED] Loading bar

Hybrid View

  1. #1

    Thread Starter
    Addicted Member ajames's Avatar
    Join Date
    Mar 2005
    Location
    Wales, UK
    Posts
    178

    Re: Loading bar

    Quote Originally Posted by RhinoBull
    Do you mean "progress bar"? If yes then try one from MS Windows Common Control (select it from components).
    Right, i've done that, but how do i get it to increase if i retrieve a percentage from somewhere and make it increase/decrease to that point?

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Loading bar

    It doesn't fill. Set the interval to 100 (or more) to get it to move 10 times per second. It swivels back and forth while it's running. If you want something to fill, you'd have to use a progress bar.

  3. #3

  4. #4

    Thread Starter
    Addicted Member ajames's Avatar
    Join Date
    Mar 2005
    Location
    Wales, UK
    Posts
    178

    Re: Loading bar

    Quote Originally Posted by RhinoBull
    Depends on what "somewhere" is so what is it?
    Somewhere could be a textbox, then a button to make it jump to that point.
    Also, could i make it start at 0% and increase all the way to the top?

  5. #5
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Loading bar

    Sorry, it's not clear. You see if you want to show progress of some process you must know at least the size of that something and also way of looping so you can increment some counter.
    So, if you can give a little more details then I'd happy to post sample code for you.

  6. #6
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Loading bar

    You can add a click event to this to change the position.
    VB Code:
    1. Option Explicit
    2.  
    3. Private Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)
    4.  
    5. Private Sub Form_Activate()
    6.   ProgressBar1.Min = 0
    7.   ProgressBar1.Max = 100
    8.   ProgressBar1.Value = 0
    9.   ProgressBar1.Enabled = True
    10.   Dim x As Integer
    11.   Dim q As Long
    12.   For x = 0 To 100
    13.     DoEvents
    14.     ProgressBar1.Value = x
    15.     Sleep 50
    16.   Next x
    17.   MsgBox "Done"
    18.   Unload Me
    19. End Sub

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