ProgressBar control in Visual Basic6.0


A progressbar control allows you to graphically represent the progress of a transaction. It is used to inform the user about  processing. It shows the user the status of computations/processing.Number of applications, such as setups, database-driven applications, and file transfer tools, swear by progress bars.

1.Click on “Start” .Select “All Programs -> Microsoft Visual Studio 6.0 ->Microsoft Visual Basic 6.0.” .

2. Select “Standard EXE” from the list in the New Project dialog box and click on “Open.” Click on “Project” on the menu bar, then select “Components” from the drop-down menu.

3. Scroll down the list in the box until Microsoft Windows Common Controls 6.0 (SP4) is visible. Click on the checkbox to select the component and then click on “OK.” All components show in the Toolbox.

4. Choose the “ProgressBar” control from the list of controls in the toolbox. Place the control on the form in Visual Basic.Also add one Label1 and Timer1 control on the Form1.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5. Change the Timer1 property  “Interval=100”.Double click on timer1 control and write code here as shown in figure below:

 

 

 

 

 

 

6. To Run the program press <f5>. You see when run the program time is start Progressbar value is shown in Label1.when the time is complete .The application is terminate.Output is below:

Comments are closed.