I wanna make a process bar just as Winamp.But I can realize it.
Printable View
I wanna make a process bar just as Winamp.But I can realize it.
Code:'not sure what your are after but this is an example
'or making your own progress bar with a picture box
'
Work = Int(Abs(Percent))
If Work > 100 Then Work = 100
'
With frmSaveTips.Progress '<<< With application form
.BackColor = vbWhite '<<< White background
If Not .AutoRedraw Then '<<< picture in memory ?
.AutoRedraw = True '<<< make one
End If
.Cls '<<< clear picture in memory
.ScaleWidth = 100 '<<< new scalemodus
.DrawMode = 10 '<<< not XOR Pen Modus
Num = Format$(Work, "###") + "% Completed"
.CurrentX = 50 - .TextWidth(Num) / 2 '<<< %age is Centered
.CurrentY = (.ScaleHeight - .TextHeight(Num)) / 2
frmSaveTips.Progress.ForeColor = vbBlack '<<< Black text
frmSaveTips.Progress.Print Num '<<< print percent
frmSaveTips.Progress.Line (0, 0)-(Work, .ScaleHeight), vbBlue, BF
.Refresh '<<< show
End With
'
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' <<<<<<<<<<<< event code for form >>>>>>>>>>>>>>>>>>>
Private Sub Command1_Click()
intTotalCount = 1000 'whatever..use 1000 for this example
'print the line & increment the count
Dim i, copied
For i = 1 To 1000
Print "This is a progress bar sample!"
copied = copied + 1 'increment for progress bar
Call DoProgress(copied / intTotalCount * 100) 'progress bar set to 100
Next i
End Sub
I find a control named Slider in Microsoft Windows Common Controls 6.0 and it doesn't look well.I wanna make my own Slider control instead.But I can't drag object(Picture1).5~~~~~~~~~~~~~
This is my trouble.
you could use the progress bar