计时器整点溢出 我这个计时器的小程序 到了晚上00:00的时候就溢出了 程序崩溃 谁有好的办法能够解决这个问题谢了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 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忘了发程序了 不好意思 补一下 哈 就是你帮我编的小程序 jhone99 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 time 换成now就可以了,time相减00:00减08:00就会出问题,now加上日期就没有问题了2009-07-27 00:00减2009-07-26 08:00就没有问题了 一个很简答很简答的VBA 程序,出现了很奇怪的结果 给别人写了个程序 被骗了,对方不给钱, 想写个程序销毁发出的软件! 关于游戏数据内存地址 实时错误3043,磁盘或网络错误 请问高手. 数据库忽大忽小的? 导出sql数据库到access的怪问题 利用Winsocket控件实现C/S结构,主要实现发送 接收Excel文件的功能? vb如何设置一个窗口总在最上面,不被其他窗口覆盖? 玩VB呢??还是做网页好呢?(好像两样都没啥意思),我道到干什么呀 vb小问题! 如果你也被一些公司 老板欺骗过 请进来看看
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忘了发程序了 不好意思 补一下
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
now加上日期就没有问题了2009-07-27 00:00减2009-07-26 08:00就没有问题了