找回密码
 加入
搜索
查看: 2014|回复: 4

[系统综合] 为什么时间怎么都修改不了。。

[复制链接]
发表于 2016-1-26 20:31:19 | 显示全部楼层 |阅读模式
我想把时间修改为23:59:38秒。为什么用GUICtrlSetData怎么都修改不了啊
#include <GUIConstantsEx.au3>
#include <DateTimeConstants.au3>
Local $n, $msg
        GUICreate("My GUI get time", 200, 200, 800, 200)
        $n = GUICtrlCreateDate("", 20, 20, 100, 20, $DTS_TIMEFORMAT)
        GUICtrlSetData($n,@HOUR&":"&@MIN&":"&@SEC&" 23:59:38");;;;;;;;;修改时间为23:59:38
        GUISetState()
        ; 运行界面,直到窗口被关闭
        Do
                $msg = GUIGetMsg()
        Until $msg = $GUI_EVENT_CLOSE

        MsgBox(4096, "Time", GUICtrlRead($n))
        GUIDelete()
发表于 2016-1-26 21:08:37 | 显示全部楼层
GUICtrlSetData($n, '2016/01/26 23:59:38')
 楼主| 发表于 2016-1-26 22:02:51 | 显示全部楼层
回复 2# afan
我擦。。老大就是老大。分分钟搞定。谢谢!
发表于 2016-1-31 11:24:11 | 显示全部楼层
原因是日期格式不对吗?
发表于 2017-8-17 00:04:02 | 显示全部楼层
老大就是老大。分分钟搞定。谢谢!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-4-24 14:42 , Processed in 0.073606 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表