What is the code in using the progressbar in Visual Basic 6. 0? Thanks..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Eduard Allen
    New Member
    • Feb 2008
    • 2

    What is the code in using the progressbar in Visual Basic 6. 0? Thanks..

    I am a newbie to this site.. Would you help to know the code in progressbar in visual basic 6.0? That after 3 seconds another form will appear. I hope you could help me guys..
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    1. You need to use a timer control.
    2. Increase the value property of the progressbar at a particular time interval using timer event.
    3. Set the timer interval to reach the progressbar max value after a particular time .
    4. Hide the current form.
    5. Open another form.
    Last edited by Killer42; Mar 3 '08, 02:26 AM.

    Comment

    • VACEPROGRAMER
      Banned
      New Member
      • Nov 2007
      • 167

      #3
      Write this in timer1

      [CODE=vb]Progressbar1.Ma x = 3
      Progressbar1.Va lue = Progressbar1.Va lue + 1

      If Progressbar1.Va lue = 3 Then
      Form2.Show
      Progressbar1.Va lue = 0
      Timer1.Enabled = False
      End If[/CODE]


      VxE
      Last edited by Killer42; Mar 3 '08, 02:25 AM. Reason: Added CODE=vb tag

      Comment

      • VACEPROGRAMER
        Banned
        New Member
        • Nov 2007
        • 167

        #4
        By the way. Set the Timer interval to 1000

        VxE
        Last edited by Killer42; Mar 3 '08, 02:23 AM.

        Comment

        • Killer42
          Recognized Expert Expert
          • Oct 2006
          • 8429

          #5
          To get a smoother animation on the progress bar, just set the Max higher and the timer interval smaller, so it is incremented more times between the start and the end. The code provided will cause the bar to jump in three big leaps. (In fact, more likely the user will only see two, before it vanishes.)

          Comment

          • VACEPROGRAMER
            Banned
            New Member
            • Nov 2007
            • 167

            #6
            Yeah, thats rigiht . . . .
            But you can change the Interval on the Tomer , The Max on the rpgressbar and change the value for ading in the value

            Comment

            Working...