Solved

Progress Bar

Posted on 2001-06-14
3
244 Views
Last Modified: 2010-05-02
Ok, I really feel like a moron having to ask this question but my brain is fried. I have a form with a progress bar and a timer. The form is just for visual. I want to simulate that the app is grading an exam so I am using a progress bar for the effect. I have the timer's interval set to 3000. Can someone provide me with the code to update the progress bar while the timer is running its interval? I apologize for having to ask this question. Thanks for your help.

BTW - running VB6, ado2.6
0
Comment
Question by:stacey14
3 Comments
 

Accepted Solution

by:
_Rha7_ earned 40 total points
ID: 6193174

  Just set the sglIncrement variable to whatever you want the increment to be, the Min & Max values can be set at design time in the properties of the control, have fun :)

  _Rha7_

============================================
Dim sglIncrement As Single

Private Sub Form_Load()

  Me.ProgressBar1.Min = 0#
  Me.ProgressBar1.Max = 100#
  sglIncrement = 1#
 
End Sub

Private Sub Timer1_Timer()
  If Me.ProgressBar1.Value < Me.ProgressBar1.Max Then
    Me.ProgressBar1.Value = Me.ProgressBar1.Value + sglIncrement
  Else
    Me.Timer1.Enabled = False
  End If
End Sub
============================================
0
 
LVL 4

Expert Comment

by:amit_panjwani
ID: 6193898
I assume that what rha7 suggested is near towhat you are asking, only if could be more clear what you wanted to do viz
Update Progress bar synchronizing it with Timer or Database Records

If you want to sync progressbar with Timer - rha7 has offered solution . Else you have to be clear

would you like to use another Timer for same purpose ?

Amit
0
 

Expert Comment

by:costello
ID: 6400333
Force accepting Rha' answer.

costello
Community Support Moderator @ Experts-Exchange
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now