这个进度条为什么不能用?
下面是一个进度条的代码,运行后,框架出现了,但不见"进度",不知问题出在何处?哪位能指点一下,先谢了.
Const MaxValue = 100
Const MinValue = 0
Dim Gene As Single
Dim ProValue As Single
Sub InitData()
Gene = Picture1.ScaleWidth / (MaxValue - MinValue)
End Sub
Sub SetProBar(value As Single)
Dim X As Single
ProValue = value
If ProValue > MaxValue Then
ProValue = MaxValue
Else
If ProValue < MinValue Then
ProValue = MinValue
End If
End If
Text1.Text = ProValue
X = (ProValue - MinValue) * Gene
With Picture1
Picture1.Picture = Image1.Picture
Picture1.Line (X, 0)-(.ScaleWidth, .ScaleHeight), vbWhite, BF
End With
End Sub