我编了个VB的程序,我现在想让我的界面好一点就变了个动画的小程序 
Private Sub Timer1_Timer() 
Dim i_Count As Integer 
'Dim i_CountDisplay As Integer 
'For i_Count = 1 To 9 
'Image1(i_Count).Visible = False 
'Next 
If (i_CountDisplay > 9) Then 
i_CountDisplay = 1 
End If 
Image1(i_CountDisplay).Visible = True If (i_CountDisplay = 1) Then 
Image1(9).Visible = False 
Else 
Image1(i_CountDisplay - 1).Visible = False 
End If 
i_CountDisplay = i_CountDisplay + 1 
End Sub 
我在我的主程序中 就是用了Timer1.Enabled = True 
但都是我的主程序执行过程中,没有显示我的动画到结束才显示,但是这不是我想要的效果,我想等主程序结束时,这个动画也结束(主程序是查找程序) 
请各位大侠指点!在此谢谢了.
能不能告诉我为什么会出现这种情况

解决方案 »

  1.   

    在主程序中间加等待,把时间让给timer
      

  2.   

    如果是最开始打开的时候这样的话,可以把动画放在Sub Main()中,等待Sub Main()执行完成后再调用主程序窗体
      

  3.   

    我的主程序用一个按钮的Click事件控制
    Private Sub FindButton_Click()
    Timer1.Enabled = TrueDim i As Integer
    i = 0
    For i = 0 To 5'//////////////////////////////////////////////
    If i = 0 Then
    ......
    Timer1.Enabled = False
    end sub我加了do events还是不行