Solved

Progress Bar

Posted on 2001-06-14
3
245 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

911 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

22 Experts available now in Live!

Get 1:1 Help Now