Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add a Progress Bar Control

Status
Not open for further replies.

AccessGuruCarl

Programmer
Jul 3, 2004
471
US
How do I add a progress bar to my toolbar or the form?

I've looked in components, but can't find it!

Is it called something else????

Don't really use VB much, mainly Access(VBA)

Using VB6

Please Help....

AccessGuruCarl
Programmers helping programmers
you can't find a better site.
 
Project -> Components

Select 'Microsoft Windows Common Controls 6.0'



-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
I should have mentioned that if you are using a manifest file to emulate an XP theme, then you should use 'Microsoft Windows Common Controls 5.0'.


-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Thanks...

I won't even try to mess around with XP themes...

Just need a simple form with a progress bar, while users are downloading an update file(s) over the web.

A couple files are rather large, and if they choose them the hour-glass just doesn't cut-it. They think the app hung, and quit the download.

I have several to choose from...
Microsoft Windows Common Controls 5.0 (SP2)
Microsoft Windows Common Controls 6.0 (SP6)
Microsoft Windows Common Controls-2 5.0 (SP2)
Microsoft Windows Common Controls-2 6.0 (SP4)
Microsoft Windows Common Controls-3 6.0 (SP5)

This will be used in a multi-environment, does it matter which one I'll use?

I choose: Microsoft Windows Common Controls 6.0 (SP6)
for now....

Thanks again

AccessGuruCarl
Programmers helping programmers
you can't find a better site.
 
I don't really like the Progress Bar that VB has, so I have my own.

On the Form, place a Command1, Timer1, Frame1 and inside the frame place Label1
Code:
Option Explicit

Private Sub Command1_Click()

Me.MousePointer = vbHourglass
Timer1.Interval = 100
Command1.Caption = "Going..."
Command1.Enabled = False

End Sub

Private Sub Form_Load()

With Frame1
    .BorderStyle = 0
    .Left = 0
    .Width = Me.Width
    .Top = Me.Height / 2
    .Height = 200
End With
With Label1
    .Caption = ""
    .Top = 0
    .Left = 0
    .Width = 0
    .Height = Frame1.Height
    .BackColor = vbBlue
End With
Command1.Caption = "Start Bar"

End Sub

Private Sub Timer1_Timer()

With Label1
    .Width = .Width + 30
    If .Width > Frame1.Width Then
        .Width = 0
        Timer1.Interval = 0
        Command1.Caption = "Start Bar"
        Command1.Enabled = True
        Me.MousePointer = vbDefault
    End If
End With

End Sub

Have fun

---- Andy
 
Andy,

You can get a VERY similar result by using 'Microsoft Windows Common Controls 6.0 (SP6)' and setting the following properties

[tt]Scrolling = '1 - ccScrollingSmooth'
BorderStyle = '0 - ccNone'
Appearance = '0 - ccFlat'[/tt]


-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Fine and nice, but this (SP6) gets me worry....

Isn't it that the trouble maker this Service Pack 6? or am I mixing something here?

---- Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top