以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  倒数时间  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=170645)

--  作者:aaa1234
--  发布时间:2021/8/3 10:39:00
--  倒数时间

老是我在timetick填写这代码为什么显示不出时间Dim d As Date = Date.Today   \'获取今日的日期
Dim dt As Date = format(d,"yyyy-MM-dd 23:59:59")
Dim t As TimeSpan = dt - Date.Now  
e.Form.Controls("aaa").Text = "剩余" & t.Days & "天" & t.Hours & "小时" & t.Minutes & "分" & t.Seconds & "秒"

--  作者:aaa1234
--  发布时间:2021/8/3 10:39:00
--  
是我的代码出现问题吗
--  作者:有点蓝
--  发布时间:2021/8/3 10:44:00
--  
参考:http://www.foxtable.com/webhelp/topics/1476.htm

e.Form.Controls("aaa").Text = "剩余" & t.Days & "天" & t.Hours & "小时" & t.Minutes & "分" & t.Seconds & "秒"
Application.DoEvents