Progress Bar Non-OCX
Fill the progressbar up to the percent given.
AI
Riepilogo AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Codice sorgente
'Visit: http://slikk.emunx.net/ or http://slikk.emunx.net/forum and support our site, we just got it up and running and we need visitors, thanks. Public Sub UpdateProgress(pBar As PictureBox, Percent As Single, Optional ByVal ShowPercent = False) Dim sData As String If Not pBar.AutoRedraw Then '//no memory? pBar.AutoRedraw = -1 'nope, we make some End If pBar.Cls '//clear memory pBar.ScaleWidth = 100 'set scale's width pBar.DrawMode = 10 '//set draw modus If ShowPercent = True Then sData$ = Format(Percent, "###0") + "%" '//format percent pBar.CurrentX = 50 - pBar.TextWidth(sData$) 'set the currentX for the progress pBar.CurrentY = pBar.ScaleHeight - pBar.TextHeight(sData$) 'set the currentY for the progress Debug.Print sData$ 'show percent in debug window End If pBar.Line (0, 0)-(Percent, pBar.ScaleHeight), , BF pBar.Refresh End Sub 'Call UpdateProgress (Picture1, 50, False)
Commenti originali (3)
Recuperato da Wayback Machine