Click here to Skip to main content
12,512,439 members (68,117 online)
Click here to Skip to main content
Add your own
alternative version

Stats

94.2K views
406 downloads
25 bookmarked
Posted

Animated Progress in Statusbar

, 27 Oct 2004
Rate this:
Please Sign up or sign in to vote.
Displays an animated progress in windows statusbar, NOT using the progressbar-control!

Animation created with Camtasia Studio 2 Evaluation Version

Introduction

This is just a code-snippet with which you can easily display a netscape-like progressbar in your windows-statusbar. It has 2 different modes: (determined by value of the control)
  • -1 = Animated Status, when remaining time is not calculateable
  • 0-100 = Normal Status displaying

How does it work?

It adds its own panel to your statusbar at runtime and handles all drawing in its own class.

The idea is based on Matthew Hazlett Implementation

Using the code

Dim progress1 As ProgressStatus
Private Sub Form1_Load(ByVal sender As System.Object,
  ByVal e As System.EventArgs) Handles MyBase.Load
    progress1 = New ProgressStatus(StatusBar1)
    With progress1
        .Style = StatusBarPanelStyle.OwnerDraw
        .MinWidth = 200
        .BorderStyle = StatusBarPanelBorderStyle.Raised
    End With
    StatusBar1.Panels.Add(progress1)
    Show()
End Sub

You can change the value and the animation speed like following:

progress1.progress = 53  'percent= possible values: 0-100 !
progress1.progress = -1  'animates the bar
progress1.Animspeed= 200 'ms!

Points of Interest

No flickering, because the panel adds its own picturebox and draw then to it!

History

  • 10/28/2004 first release
  • 10/28/2004 (later) 2nd release with own panel-class (no flickering) & cleaner code

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

thomasdev
Engineer
Germany Germany
Thomas is interested in technical programming, networking and security technologies.

Currently he's studying at a german university

You may also be interested in...

Pro
Pro

Comments and Discussions

 
GeneralSample app works great but doesn't when added to another project Pin
AChatelain17-Apr-07 6:43
memberAChatelain17-Apr-07 6:43 
GeneralRe: Sample app works great but doesn't when added to another project Pin
AChatelain17-Apr-07 6:57
memberAChatelain17-Apr-07 6:57 
QuestionVB.net Pin
beena shah11-Dec-06 19:33
memberbeena shah11-Dec-06 19:33 
QuestionWorks first time and not again Pin
MMRR2-Aug-06 2:20
memberMMRR2-Aug-06 2:20 
GeneralAnimated status while loading database query [modified] Pin
abbasy17-Jul-06 0:22
memberabbasy17-Jul-06 0:22 
QuestionHow to Dispose of this? Pin
moon docker28-Jun-06 8:05
membermoon docker28-Jun-06 8:05 
QuestionStatus messages? Pin
cknipe30-Nov-05 1:34
membercknipe30-Nov-05 1:34 
AnswerRe: Status messages? Pin
cknipe30-Nov-05 2:34
membercknipe30-Nov-05 2:34 
GeneralNo refresh when programm has to work hard ... Pin
SMaurer3-Nov-04 23:13
memberSMaurer3-Nov-04 23:13 
GeneralRe: No refresh when programm has to work hard ... Pin
thomasdev4-Nov-04 2:47
memberthomasdev4-Nov-04 2:47 
GeneralRe: No refresh when programm has to work hard ... Pin
Caelib5-Nov-04 6:48
memberCaelib5-Nov-04 6:48 
GeneralRe: No refresh when programm has to work hard ... Pin
thomasdev6-Nov-04 4:20
memberthomasdev6-Nov-04 4:20 
GeneralRe: No refresh when programm has to work hard ... Pin
SMaurer6-Nov-04 5:41
memberSMaurer6-Nov-04 5:41 
GeneralRe: No refresh when programm has to work hard ... Pin
thomasdev6-Nov-04 12:08
memberthomasdev6-Nov-04 12:08 
GeneralRe: No refresh when programm has to work hard ... Pin
SMaurer6-Nov-04 23:31
memberSMaurer6-Nov-04 23:31 
GeneralRe: No refresh when programm has to work hard ... Pin
dscemama19-Jan-05 1:46
memberdscemama19-Jan-05 1:46 
GeneralRe: No refresh when programm has to work hard ... Pin
thomasdev20-Jan-05 11:41
memberthomasdev20-Jan-05 11:41 
GeneralFlickering Pin
alcedes27-Oct-04 13:19
memberalcedes27-Oct-04 13:19 
GeneralRe: Flickering Pin
thomasdev27-Oct-04 22:12
memberthomasdev27-Oct-04 22:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160929.1 | Last Updated 27 Oct 2004
Article Copyright 2004 by thomasdev
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid