VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

FIXEDPercent Bar Without a VBX

Worm  (2 Submissions)   Miscellaneous   Visual Basic 3.0   Unknown Difficulty   Wed 3rd February 2021

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

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

Rate FIXEDPercent Bar Without a VBX (4(4 Vote))
FIXEDPercent Bar Without a VBX.bas

FIXEDPercent Bar Without a VBX Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters