?
Solved

Proggress Bar Problem

Posted on 2003-03-14
4
Medium Priority
?
170 Views
Last Modified: 2010-04-07
I can find tons of examples of how to use progress bar controls, But nowhere can I find how to add a progress bar to my form.  I am using Visual Studio 6 and it is not on my tool bar as an object.  I'm sure I will feel stupid once I find it, but could someone point me in the right direction please.

Thanks
0
Comment
Question by:cowboysnindians
  • 3
4 Comments
 
LVL 2

Expert Comment

by:Jacamar
ID: 8137829
You can create your own progress bar if you like.  Use a picture box.  Set a scale to the box (

Picture1.scale(-1,1.1)-(101,-0.1)

Then draw a filled rectangle from 0,0 to i,1 each time the next step is executed.  Like in your loop put i = i+1 then draw your rectangle.  Each time it loops through, it will draw the rectangle until all 100 (this number can change) are done, and the progress bar will be complete.
0
 
LVL 1

Accepted Solution

by:
JH0401 earned 200 total points
ID: 8137844
Project-Components - check the Microsoft Common Controls and press apply.  Now it will appear on you tool bar.

You can control its index with a timer as follows:

add a timer & a progressbar

***********************************
Option Explicit

Private Sub Form_Load()
ProgressBar1.Min = 0
ProgressBar1.Max = 200
Timer1.Interval = 100
Timer1.Enabled = True
End Sub

Private Sub Timer1_Timer()
ProgressBar1.Value = ProgressBar1.Value + 5
If ProgressBar1.Value = 200 Then ProgressBar1.Value = 0
End Sub
0
 
LVL 1

Expert Comment

by:JH0401
ID: 8137870
Sorry -- thats Microsoft Windows Common Controls
& you control the progress bar's value -- not index

0
 
LVL 1

Expert Comment

by:JH0401
ID: 8137882
Project - Components - check Microsoft Windows Common Controls 6.0 (on the controls tab) & press apply
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying 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

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…
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…
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…
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…
Suggested Courses

616 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