vb 动态添加 timer

Private WithEvents Timer1 As Timer

 

 

Private Sub Form_Load() '初始化'

  Set Timer1 = Controls.Add("vb.timer", "Timer1")
  Timer1.Interval = 1000
  Timer1.Enabled = True

End Sub

 

'*******************************动态Timer事件***************************
Private Sub Timer1_Timer()
' MsgBox "yes"


End Sub

posted @ 2012-05-08 18:07  镇水古月  阅读(423)  评论(0编辑  收藏  举报