dantay9 Posted March 15, 2009 Share Posted March 15, 2009 (edited) I am well on my way to making a calendar, but I am having trouble changing the date of my controls. I think it has something to do with the format, but I am not sure. Thanks in advance! Edited March 21, 2009 by dantay9 Link to comment Share on other sites More sharing options...
Valuater Posted March 15, 2009 Share Posted March 15, 2009 (edited) I do not think this is what you want ; Gui $Button[0] = GUICtrlCreateButton("+", 752, 79, 23, 23, 0) and $Button[3] = GUICtrlCreateButton("Edit", 608, 424, 150, 30, 0) ; while loop While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit Case $FileExit Exit Case $Button[1] ; add button AddAppointment() Case $Button[0] ; edit category button EditCategory() EndSwitch ??? Valuater 8) EDIT: I do not have trouble changing the dates on the controls Edited March 15, 2009 by Valuater Link to comment Share on other sites More sharing options...
dantay9 Posted March 15, 2009 Author Share Posted March 15, 2009 Are you talking about whether or not those two buttons belong? Link to comment Share on other sites More sharing options...
Valuater Posted March 15, 2009 Share Posted March 15, 2009 (edited) I notice that the edit button was not working. I thought that was part of the problem. Can you explain the problem just a little more, which control is having the problem etc. Again... I do not have trouble changing the dates on the controls 8) Edited March 15, 2009 by Valuater Link to comment Share on other sites More sharing options...
dantay9 Posted March 15, 2009 Author Share Posted March 15, 2009 (edited) The edit control is going to be used, I just haven't done anything with it yet. My problem is around line 162 with changing the dates. They don't change. They are supposed to revert back to their previous time. The whole idea is to have the event come up in the listview box and when clicked, the stuff from that event fills in the input boxes, dates, and combo boxes. I can't get the date or the time to change. It looks right in the ini file, but I think the format must be wrong Edit: I figured it out the problem. The date in the ini file is 3/14/2009 when it needs to be 2009/3/14 to work. How do you change the date to this format? Edited March 15, 2009 by dantay9 Link to comment Share on other sites More sharing options...
Valuater Posted March 15, 2009 Share Posted March 15, 2009 (edited) I'm glad you got it to work. I could not get it to work. I see you set the messge with this... $Date[0] = GUICtrlCreateDate("2009/03/14", 248, 195, 89, 21, $WS_TABSTOP) GUICtrlSendMsg(-1, $DTM_SETFORMAT_, 0, "MM/dd/yyyy") $Date[1] = GUICtrlCreateDate("2009/03/14", 352, 195, 89, 21, $WS_TABSTOP) GUICtrlSendMsg(-1, $DTM_SETFORMAT_, 0, "MM/dd/yyyy") 8) Edited March 15, 2009 by Valuater Link to comment Share on other sites More sharing options...
dantay9 Posted March 16, 2009 Author Share Posted March 16, 2009 Thanks for your help. Those functions make my script faster and easier to read. Link to comment Share on other sites More sharing options...
dantay9 Posted March 16, 2009 Author Share Posted March 16, 2009 I got it working. I updated the first post. Link to comment Share on other sites More sharing options...
Valuater Posted March 16, 2009 Share Posted March 16, 2009 Looks good! If you use this Func FormatDate($ToChange) If $ToChange = "" Then Return $ToChange it will stop the crash when the user clicks the "blank" area of the listview 8) Link to comment Share on other sites More sharing options...
dantay9 Posted March 17, 2009 Author Share Posted March 17, 2009 Thank you for helping me as I go along. Updated the first post again. 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