怎样实现这样一个简单的动画效果!非常急!
savl 2003-06-02 04:15:24 由于一些过程的运行时间长,为了在界面上用一个动画来表示过程在运行,我的代码如下: 但并没有出现动画效果啊,这是为什么,该如何实现,望指教
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Timer1.Enabled = True
Me.Timer1.Start()
xx() '这个过程运行时间很长
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Static Dim Counter As Integer = 0
Counter = Counter + 10
If Counter = 150 Then
Label3.Text = "请稍候"
End If
If Counter = 300 Then
Label3.Text = "请稍候…"
End If
If Counter = 450 Then
Label3.Text = "请稍候……"
End If
If Counter = 600 Then
Label3.Text = "请稍候………"
Counter = 0
End If
End Sub