_GUICtrlMonthCal_GetCurSel 无法获取日期
创建的日历控件无法获取日期 。头晕了,来万能的论坛求助#Include <GuiMonthCal.au3>#include <DateTimeConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form_d = GUICreate("text", 312, 226, 301, 205)
$MonthCal1 = GUICtrlCreateMonthCal("2018/04/03", 0, 0, 329, 241)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $MonthCal1
$date = _GUICtrlMonthCal_GetCurSel($MonthCal1)
MsgBox(0,"",$date)
Exit
EndSwitch
WEnd
#Include <GuiMonthCal.au3>
#include <DateTimeConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form_d = GUICreate("text", 312, 226, 301, 205)
$MonthCal1 = GUICtrlCreateMonthCal("2018/04/03", 0, 0, 329, 241)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $MonthCal1
;$date = _GUICtrlMonthCal_GetCurSel($MonthCal1)
$date = GUICtrlRead($MonthCal1)
MsgBox(0,"",$date)
Exit
EndSwitch
WEnd 回复 2# alaws
原来获取了还要再读取一次,受教了,十分感谢 回复 3# aryce
不是再次读取,而是更换了不同的获取方式而已。代码中已把你曾经使用的获取方式给注释了(代码保留是为了便于你区分)
页:
[1]