1:我设置了timer.interval=1
好象还是一秒而不是一豪秒
2:还有一个问题就是能不能两个时间控件同时使用?

解决方案 »

  1.   

    Option ExplicitPublic lTimerId As Long
    Private Declare Function SetTimer Lib "user32" (ByVal hWnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
    Private Declare Function KillTimer Lib "user32" (ByVal hWnd As Long, ByVal nIDEvent As Long) As LongPrivate Sub TimerProc(ByVal lHwnd As Long, ByVal lMsg As Long, ByVal lTimerId As Long, ByVal lTime As Long)
        '写入你的代码
    End SubPublic Sub StartTimer(lMinute As Long)
        lTimerId = SetTimer(0, 0, lMinute, AddressOf TimerProc)
    End SubPublic Function StopTimer(lTimerId As Long) As Long
        StopTimer = KillTimer(0, lTimerId)
    End Function
    -------------------
    应该比TIMER控件好点。