#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$gui = GUICreate("背景窗口", 400, 100)
GUISetOnEvent($GUI_EVENT_CLOSE, "_GUI")
Opt("GUIOnEventMode", 1) ;切换至 事件模式
Local $Search_X = 30, $Search_Y = 20, $lE = 20
$Input_W = 80
GUICtrlCreateLabel("日期" & ", 从:", $Search_X, $Search_Y, $Input_W, 16)
GUICtrlSetColor(-1, 0x666666)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$Orders_StartDate_Input = GUICtrlCreateInput("", $Search_X, $Search_Y+$lE, $Input_W, 24)
$Orders_StartDate = GUICtrlCreateDate(@YEAR & "/" & @MON & "/" & @MDAY, $Search_X+$Input_W, $Search_Y+$lE, 12, 24, 0x20)
GUICtrlSetFont(-1, 1)
GUICtrlSetOnEvent(-1, "_GUI")
$Search_X += $Input_W+$lE
$Input_W = 80
GUICtrlCreateLabel("到:", $Search_X, $Search_Y, $Input_W, 16)
GUICtrlSetColor(-1, 0x666666)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$Orders_EndDate_Input = GUICtrlCreateInput("", $Search_X, $Search_Y+$lE, $Input_W, 24)
$Orders_EndDate = GUICtrlCreateDate("", $Search_X+$Input_W, $Search_Y+$lE, 12, 24, 0x20)
GUICtrlSetFont(-1, 1)
GUICtrlSetOnEvent(-1, "_GUI")
GUISetState(@SW_SHOW)
While 1
WEnd
Func _GUI()
Switch @GUI_CtrlId
Case $Orders_StartDate
$StartDate = GUICtrlRead(@GUI_CtrlId)
GUICtrlSetData($Orders_StartDate_Input, $StartDate)
Case $Orders_EndDate
$StartDate = GUICtrlRead(@GUI_CtrlId)
GUICtrlSetData($Orders_EndDate_Input, $StartDate)
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
EndFunc