我这个计时器的小程序 
到了晚上00:00的时候就溢出了 程序崩溃 谁有好的办法能够解决这个问题
谢了

解决方案 »

  1.   

    Dim StartTimePrivate Sub Form_Load()
        Timer1.Interval = 1000
        Timer1.Enabled = True
        StartTime = Time
        
    End SubPrivate Sub Timer1_Timer()
        Dim intS As Integer
        
        intS = DateDiff("s", StartTime, Time)
        Text1.Text = Format(intS \ 3600, "00") & ":" & Format((intS Mod 3600) \ 60, "00") & ":" & Format(intS Mod 60, "00")End Sub忘了发程序了 不好意思 补一下
      

  2.   

    哈 就是你帮我编的小程序 jhone99
      

  3.   

    Dim StartTimePrivate Sub Form_Load()
        Timer1.Interval = 1000
        Timer1.Enabled = True
        StartTime = Now
        
    End SubPrivate Sub Timer1_Timer()
        Dim intS As Integer
        
        intS = DateDiff("s", StartTime, Now)
        Text1.Text = Format(intS \ 3600, "00") & ":" & Format((intS Mod 3600) \ 60, "00") & ":" & Format(intS Mod 60, "00")End Sub
      

  4.   

    time 换成now就可以了,time相减00:00减08:00就会出问题,
    now加上日期就没有问题了2009-07-27 00:00减2009-07-26 08:00就没有问题了