Main Menu

HOME

.Net
ASP
Assembly
C
C++
Delphi
HTML
Java
JavaScript
MySQL
PC interface
Powershell
Perl
PHP
VBScript
Visual Basic
XML

Make money selling software. Check this out here

Hosted clickbank mall. Check this out here




   Misc

   Amazon

   Links

    


Progress Bar
 

 

A progress bar displays either a growing or shrinking blue bar to give the user feedback on some kind of operation . This can be downloading a file off the internet or the completion of a lengthy task . The blue bar can be segmented or it can be solid .

The ProgressBar is located in the Microsoft Windows Common Controls so to add this control to your toolbox you have to click on Projects on the menu bar , then click on components and the Components dialog box will appear ,then scroll down and locate the Microsoft Windows Common Controls 6 and place a check in the check box beside it and click on OK. 

*Note : CTRL + t also opens the Components dialog box

Properties , Methods and events

significant properties

Scrolling : determines if the progress display appears either solid or segmented
Negotiate : this determines whether a control that can be aligned is displayed when an active object on the form displays one or more toolbars.
Orientation : determines whether the orientation is horizontal or vertical
Value : the current setting of the progress bar
Appearance : this makes the progress bar appear either in 3D or flat
BorderStyle : sets the controls border style
Max , Min : sets the maximum and minimum values of the progress bar

Methods

progress bars have the standard methods of other controls these include Move , Click , DblClick and so on .

Example :

Simply place a progress bar on the screen set its Min property to 0 and its Max property to 100 . Experiment between the two different Scolling properties of ccScrollingSmooth (normal) or ccScrollingStandard (segmented) . To animate the progress bar place a Timer control on the form and set its Interval property to 1000 milliseconds .Now add a command button to the form ( the user will click this and the progress bar will move ) , make the command buttons caption say something like start .

First put the following code in the Form load event procedure

Now put the following code in the Command buttons Click event procedure

and finally the following code gets placed in the timers Timer event

This code makes the progress bar every second until it reaches its maximum value .

Here is a picture of this code in action .

 

 

 

 

 




   Sponsors
 

   Software
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals

   Source Code
Delete a file(VB)
Random string(PHP)
display icon in picturebox control(VB.net)
Size of a webpage with PHP and cURL(PHP)
creates a text file(VB)
Launch notepad(C++)
renames your computer(VB)
display the available mac addresses(C Sharp)

    




Copyright © 2003 by programmershelp.co.uk