Uncle Argyle Posted October 3, 2006 Share Posted October 3, 2006 Hi, I cannot update a date control with my script below...anyone have any thoughts? Thanks in advance, Mike. #include <GuiConstants.au3> Opt("GUIOnEventMode", 1) $DTM_SETFORMAT = 0x1005 $style = "MM-dd-yyyy" $Form1 = GUICreate("Test", 200, 100, -1, -1) $Button1 = GUICtrlCreateButton("Update",75,60,50,21) $Date1 = GUICtrlCreateDate("", 50, 20, 100, 21) GuiCtrlSendMsg($Date1, $DTM_SETFORMAT, 0, $style) GUISetOnEvent($GUI_EVENT_CLOSE, "exitapp") GUICtrlSetOnEvent($Button1, "Update") GUISetState(@SW_SHOW) While 1 Sleep(100) WEnd Func Update() GUICtrlSetData($Date1, "02-10-1990") EndFunc Func exitapp() Exit EndFunc Link to comment Share on other sites More sharing options...
Skruge Posted October 3, 2006 Share Posted October 3, 2006 GUICtrlSetData($Date1, "1990/02/10") [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font] Link to comment Share on other sites More sharing options...
Uncle Argyle Posted October 4, 2006 Author Share Posted October 4, 2006 GUICtrlSetData($Date1, "1990/02/10")Excellent, thanks! I was assuming that I had to update the date with the format style I had set.I really appreciate the help! 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