|
本帖最后由 yohoboy 于 2019-10-18 01:34 编辑 <blockquote>#include <DateTimeConstants.au3>
參考參考,我是修改別人的源碼的
#include <DateTimeConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <date.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 406, 206, 192, 124)
GUISetFont(12, 400, 0, "MS Sans Serif")
$d1 = _DateAdd("D",0,_DateAdd('M',-1,@YEAR&'/'&@MON&'/01')) ;調整參數
$d2 = _DateAdd("D",-1,_DateAdd('M',0,@YEAR&'/'&@MON&'/01')) ;調整參數
$Date1 = GUICtrlCreateDate($d1, 120, 72, 150, 21, BitOR($DTS_UPDOWN, $WS_TABSTOP, $DTS_LONGDATEFORMAT));
$Date2 = GUICtrlCreateDate($d2, 120, 110, 150, 21, BitOR($DTS_UPDOWN, $WS_TABSTOP, $DTS_LONGDATEFORMAT));
$style = "yyyy-MM-dd"
GUICtrlSendMsg($Date1, $DTM_SETFORMATW, 0, $style)
GUICtrlSendMsg($Date2, $DTM_SETFORMATW, 0, $style)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
|
|