| 1 | #include <Date.au3>
|
|---|
| 2 | #include <GUIConstantsEx.au3>
|
|---|
| 3 | #include <WindowsConstants.au3>
|
|---|
| 4 | #include <DateTimeConstants.au3>
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 | Opt('MustDeclareVars', 1)
|
|---|
| 8 |
|
|---|
| 9 | Example()
|
|---|
| 10 |
|
|---|
| 11 | Func Example()
|
|---|
| 12 | Local $Date, $msg
|
|---|
| 13 | GUICreate("Get date", 210, 190)
|
|---|
| 14 |
|
|---|
| 15 | $Date = GUICtrlCreateMonthCal(_NowCalcDate(), 10, 10,Default,Default,$WS_BORDER+$MCS_WEEKNUMBERS, 0x00000000)
|
|---|
| 16 | GUISetState()
|
|---|
| 17 | ;
|
|---|
| 18 | MsgBox(0,"Todays weeknumber","Todays " & _NowCalcDate() & " weeknumber is " & _WeekNumberISO())
|
|---|
| 19 |
|
|---|
| 20 | ; Run the GUI until the dialog is closed or timeout
|
|---|
| 21 |
|
|---|
| 22 | Do
|
|---|
| 23 | $msg = GUIGetMsg()
|
|---|
| 24 | If $msg = $Date Then MsgBox(0, "debug", "calendar clicked")
|
|---|
| 25 | Until $msg = $GUI_EVENT_CLOSE
|
|---|
| 26 |
|
|---|
| 27 | MsgBox(0, $msg, GUICtrlRead($Date), 2)
|
|---|
| 28 | EndFunc ;==>Example
|
|---|