本帖最后由 仙乃日 于 2011-1-7 14:25 编辑 Dim $SYSTEMTIME=DllStructCreate("ushort wYear;ushort wMonth;ushort wDayOfWeek;ushort wDay;ushort wHour;ushort wMinute;ushort wSecond;ushort wMilliseconds")
DllCall("Kernel32.dll","none","GetSystemTime","ptr",DllStructGetPtr($SYSTEMTIME))
MsgBox(0,"当前系统时间:",DllStructGetData($SYSTEMTIME,"wYear")&"年"&DllStructGetData($SYSTEMTIME,"wMonth")&"月" _
&DllStructGetData($SYSTEMTIME,"wDay")&"日"&DllStructGetData($SYSTEMTIME,"wHour")&"时"&DllStructGetData($SYSTEMTIME,"wMinute")&"分" _
&DllStructGetData($SYSTEMTIME,"wSecond")&"秒"&DllStructGetData($SYSTEMTIME,"wMilliseconds")&"毫秒"&"_星期"&DllStructGetData($SYSTEMTIME,"wDayOfWeek"))
使用API_GetSystemTime来获取系统时间,其中的“时”和系统显示的不相同啊?
|