mesale0077 Posted May 27, 2009 Posted May 27, 2009 to calculate the number of days between two dates vb code publicClass Form1 PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles sonuc.Click Dim tfark AsLong Dim tt1 AsDate Dim tt2 AsDate tt1 = Text1.Text ----> this date (now date)(28/05/2009),exam or any date tt2 = Text2.Text (12/04/2009) old date or any date tfark = Text1.Text - Text2.Text Text3.Text = tfark EndSub how is auto it #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("[#] Form1 [#]", 633, 449, 192, 124) $day = GUICtrlCreateInput("day", 120, 48, 49, 21) GUICtrlCreateInput("month", 192, 48, 57, 21) $Input3 = GUICtrlCreateInput("year", 272, 48, 89, 21) $Label1 = GUICtrlCreateLabel("now date or any date", 392, 48, 104, 17) $Input1 = GUICtrlCreateInput("day", 120, 80, 49, 21) GUICtrlCreateInput("month", 192, 80, 57, 21) $Input4 = GUICtrlCreateInput("year", 272, 80, 89, 21) $date = GUICtrlCreateLabel("date 1", 24, 56, 34, 17) $Label2 = GUICtrlCreateLabel("date 2", 24, 81, 34, 17) $Button1 = GUICtrlCreateButton("ok", 400, 80, 105, 25, $WS_GROUP) $days = GUICtrlCreateEdit("", 96, 144, 273, 177) GUICtrlSetData(-1, "days") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
Valuater Posted May 27, 2009 Posted May 27, 2009 I'm thinking, How in the heck did you get $WS_GROUP in the button style? GUICtrlCreateButton("ok", 400, 80, 105, 25, $WS_GROUP) 8)
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