n9mfk9 Posted February 27, 2005 Share Posted February 27, 2005 I like to know how to use GUICtrlSetData on the date control in tis scrip to set the date to 23 thanks beau #include <GuiConstants.au3> ;Dim $WS_OVERLAPPEDWINDOW = 0xCF0000, $WS_VISIBLE = 0x10000000, ;$WS_CLIPSIBLINGS = 0x04000000 ,$ES_NUMBER=0x2000 GuiCreate("MyGUI", 392, 323,(@DesktopWidth-392)/2, (@DesktopHeight-323)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) GuiCtrlCreateLabel("Number of copies", 30, 140, 90, 30) $Copies = GuiCtrlCreateInput("5", 130, 140, 25, 20,$ES_NUMBER) GuiCtrlCreateLabel("Date", 20, 50, 80, 20) $Date = GuiCtrlCreateDate("", 110, 50, 230, 20) $Submit = GuiCtrlCreateButton("Submit", 110, 250, 100, 40) $exit = GuiCtrlCreateButton("exit", 230, 250, 100, 40) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $Submit ExitLoop Case $msg = $exit OR $msg = $GUI_EVENT_CLOSE ;-3 $ans = MsgBox(4, "Quit?", "Are you sure you want to quit?") if $ans = 6 then exit EndSelect WEnd Link to comment Share on other sites More sharing options...
jpm Posted February 27, 2005 Share Posted February 27, 2005 #include <GuiConstants.au3> ;Dim $WS_OVERLAPPEDWINDOW = 0xCF0000, $WS_VISIBLE = 0x10000000,;$WS_CLIPSIBLINGS = 0x04000000 ,$ES_NUMBER=0x2000 GuiCreate("MyGUI", 392, 323,(@DesktopWidth-392)/2, (@DesktopHeight-323)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) GuiCtrlCreateLabel("Number of copies", 30, 140, 90, 30) $Copies = GuiCtrlCreateInput("5", 130, 140, 25, 20,$ES_NUMBER) GuiCtrlCreateLabel("Date", 20, 50, 80, 20) $Date = GuiCtrlCreateDate("2005/02/23", 110, 50, 230, 20) $Submit = GuiCtrlCreateButton("Submit", 110, 250, 100, 40) $exit = GuiCtrlCreateButton("exit", 230, 250, 100, 40) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $Submit ExitLoop Case $msg = $exit OR $msg = $GUI_EVENT_CLOSE;-3 $ans = MsgBox(4, "Quit?", "Are you sure you want to quit?") if $ans = 6 then exit EndSelect WEnd msgbox(0,"date",GuiCtrlRead($date)) Is it OK? Link to comment Share on other sites More sharing options...
n9mfk9 Posted February 27, 2005 Author Share Posted February 27, 2005 #include <GuiConstants.au3> ;Dim $WS_OVERLAPPEDWINDOW = 0xCF0000, $WS_VISIBLE = 0x10000000,;$WS_CLIPSIBLINGS = 0x04000000 ,$ES_NUMBER=0x2000 GuiCreate("MyGUI", 392, 323,(@DesktopWidth-392)/2, (@DesktopHeight-323)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) GuiCtrlCreateLabel("Number of copies", 30, 140, 90, 30) $Copies = GuiCtrlCreateInput("5", 130, 140, 25, 20,$ES_NUMBER) GuiCtrlCreateLabel("Date", 20, 50, 80, 20) $Date = GuiCtrlCreateDate("2005/02/23", 110, 50, 230, 20) $Submit = GuiCtrlCreateButton("Submit", 110, 250, 100, 40) $exit = GuiCtrlCreateButton("exit", 230, 250, 100, 40) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $Submit ExitLoop Case $msg = $exit OR $msg = $GUI_EVENT_CLOSE;-3 $ans = MsgBox(4, "Quit?", "Are you sure you want to quit?") if $ans = 6 then exit EndSelect WEnd msgbox(0,"date",GuiCtrlRead($date))Is it OK?<{POST_SNAPBACK}>works good thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now