Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Progress Bar

Posted on 2001-06-14
3
Medium Priority
?
261 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 160 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 Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

926 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