README.md
December 4, 2022 ยท View on GitHub
Description
This function will let you make a percent bar without a vbx. Now you don't have to add a vbx to your program making it a bigger hassle, plus you can now pick any color percent bar you want
More Info
| Submitted On | |
| By | Worm |
| Level | Unknown |
| User Rating | 4.0 (16 globes from 4 users) |
| Compatibility | VB 3.0, VB 4.0 (16-bit), VB 4.0 (32-bit), VB 5.0, VB 6.0 |
| Category | Miscellaneous |
| World | Visual Basic |
| Archive File |
API Declarations
Sub precentworm (picture As Control, ByVal percent)
Dim num$
If Not picture.AutoRedraw Then
picture.AutoRedraw = -1
End If
picture.Cls
picture.ScaleWidth = 100
picture.DrawMode = 10
num$ = Format$(percent, "###") + "%"
picture.CurrentX = 50 - picture.TextWidth(num$) / 2
picture.CurrentY = (picture.ScaleHeight - picture.TextHeight(num$)) / 2
picture.Print num$
picture.Line (0, 0)-(percent, picture.ScaleHeight), , BF
picture.Refresh
End Sub
Source Code
'Put this in a command button or any control you want
picture1.ForeColor = RGB(0, 0, 255) 'blue bar but you can change it
For i = 0 To 100 Step 2
precentworm picture1, i
Next
picture.Cls