Please enable JavaScript to view this site.

thinBasic Help Manual

Navigation: ThinBASIC Modules > Console

Console_ProgressBar

Scroll Prev Top Next More

* * HELP & MANUAL PREMIUM PACK 4 DEMO VERSION * *

This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.

This version is copyright and may only be used for local testing purposes. It may not be distributed.

Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.

 

Description

 

Draws and update a char based progress bar.

 

Syntax

 

Console_ProgressBar(PBID, xPos, yPos, Width, Color, MinVal, MaxVal, CurrentValue)

 

Returns

 

Parameters

 

Name

Type

Optional

Meaning

PBID

Number

No

A unique number internally used to identify the Progress Bar. Use value from 1 to 255

xPos

Number

No

X start position of the progress bar

yPos

Number

No

Y start position of the progress bar

Width

Number

No

Length of the progress bar (the length between [ and ])

Color

Number

No

Color to be used.
Use or to set foreground and background console colors.

Example: %CCOLOR_BBLACK | %CCOLOR_FLIGHTCYAN

MinVal

Number

No

Minimum value

MaxVal

Number

No

Maximum value

CurrentVal

Number

No

Current value

 

Remarks

 

Character progress bar will show a char (default is *) inside a double square brackets.

Followed by current value and max value

Followed by percentage

 

Example:

 

Restrictions

 

See also

 

Console Module, Console_Box

 

Examples

 

Dim Count1 As Long

Dim Max1   As Long value 10

Dim Count2 As Long

Dim Max2   As Long value 10

Dim Count3 As Long

Dim Max3   As Long value 1000

 

'---Display 3 progress bar

For Count1 = 1 To Max1

  Console_ProgressBar(1, 10, 10, 50, 24, 1, Max1, Count1)

  For Count2 = 1 To Max2

    Console_ProgressBar(2, 10, 12, 50, 24, 1, Max2, Count2)

    For Count3 = 1 To Max3

      Console_ProgressBar(3, 10, 14, 50, 24, 1, Max3, Count3)

    Next

  Next

Next

 

 

Created with Help+Manual 8 and styled with Premium Pack Version 4 © by EC Software