Progress bars with API
By: Ramon Guerrero Date: 13/07/1998



36 KB

Download now!

This example allow you to create progress bars at will and totally through code (with no ActiveX).

To create and use a progress bar, follow this instructions:

  1. Add the class module to your project.

  2. Add this declaration:

    Dim objectname As New CProgBar32

    objectname is the name of the progressbar in the code.

  3. Then add these lines to create progbar:

    Set objectname.Parent = Me
    objectname.Create x1, y1, x2, y1

    objectname is the progbar name.
    x1 and y1 are the coordinates of the top left corner of the progbar.
    x2 and y2 are the coordinates of the bottom rigth corner of the progbar

  4. Use this line to update toolbar:

    objectname.SetProgBarPos percentage

    objectname is the progbar name.
    percentage is the current progress (from 0 to 100).

  5. To delete the progbar, if it was temporary, use this line:


    objectname is the progbar name.

You can learn how to use it by reading the code of the example and its comments, or by running the demo application.

Run the install program and specify a custom folder.

Click Here!

Visual Basic Programming Zone is a website by Lorenzo Dalla Vecchia.
Webmaster's e-mail:
Hosted by InWind: