'看看我的进度条 !Sub UpdatePic(pb As Control, ByVal percent)
Dim num$ ' Used to hold percent string If Not pb.AutoRedraw Then ' Do we have off-screen image?
pb.AutoRedraw = -1 ' No, set one up.
End If
pb.Cls ' Clear off-screen image
pb.ScaleWidth = 100 ' Set for percentage
pb.DrawMode = 10 ' Set for erasable drawing
'
' Display the percentage, centered in the picture
' box.
'
num$ = Format$(percent, "##0") + "%"
pb.CurrentX = 50 - pb.TextWidth(num$) / 2
pb.CurrentY = (pb.ScaleHeight - pb.TextHeight(num$)) / 2
pb.Print num$ ' Display percentage
'
' Draw box over the percentage.
'
pb.Line (0, 0)-(percent, pb.ScaleHeight), , BF
pb.Refresh ' Show changes on screen
End Sub'---使用方法--
For i = 1 to 100
UpdatePic Picture1 , i
Next i
Dim num$ ' Used to hold percent string If Not pb.AutoRedraw Then ' Do we have off-screen image?
pb.AutoRedraw = -1 ' No, set one up.
End If
pb.Cls ' Clear off-screen image
pb.ScaleWidth = 100 ' Set for percentage
pb.DrawMode = 10 ' Set for erasable drawing
'
' Display the percentage, centered in the picture
' box.
'
num$ = Format$(percent, "##0") + "%"
pb.CurrentX = 50 - pb.TextWidth(num$) / 2
pb.CurrentY = (pb.ScaleHeight - pb.TextHeight(num$)) / 2
pb.Print num$ ' Display percentage
'
' Draw box over the percentage.
'
pb.Line (0, 0)-(percent, pb.ScaleHeight), , BF
pb.Refresh ' Show changes on screen
End Sub'---使用方法--
For i = 1 to 100
UpdatePic Picture1 , i
Next i
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货