'看看我的进度条 !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
' ' 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
例如在开始把Value值设为1
再过几行把Value值设为5
就这样以次向下加Value值就可以了!
最后把Visible属性改为False
怎样解决???
顯現是一個splash
在splash的某個地方放上一個lable
將監測的情況從lable中表現出來
這樣連进度条都免了
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