Ticket #1254: Test_WeekNumber.au3

File Test_WeekNumber.au3, 713 bytes (added by anonymous, on Oct 28, 2009 at 4:14:36 PM)
Line 
1#include <Date.au3>
2#include <GUIConstantsEx.au3>
3#include <WindowsConstants.au3>
4#include <DateTimeConstants.au3>
5
6
7Opt('MustDeclareVars', 1)
8
9Example()
10
11Func 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)
28EndFunc ;==>Example