用timer控件,每隔20分钟触发同一个事件,请问该怎么做?

解决方案 »

  1.   

    不会吧,你可以用整秒数来定时,再在TIMER事件里计算啊,到20分钟时触发一下你想触发的事件啊
      

  2.   

    这么做吗?
    Private Sub Timer1_Timer()
    dim a
    a=a+1
    if a=20 then
    msgbox"time"
    end if
    将interval的值设为60,这么做的话不能每隔20分提示,不好意思,刚学VB,请大家帮忙!·
      

  3.   

    Private Sub Timer1_Timer()
    static a
    a=a+1
    if a=20 then
    msgbox"time"
    a=0
    end if
    将interval的值设为60000,这么做的话不能每隔20分提示,不好意思,刚学VB,请大家帮忙!·
      

  4.   

    记下时间,用timer控件,在Timer1_Timer()里每秒判断一次当前时间,若已到20分钟,触发事件
      

  5.   

    Option ExplicitDim T As LongPrivate Sub Form_Load()
        T = 0
        Timer1.Interval = 60000
    End SubPrivate Sub Timer1_Timer()
        T = T + 1
        If T = 20 Then MsgBox "时间到", vbInformation
    End Sub