Solved

Progress Bar

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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

680 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