Catatan "Winn_Doeell"

"Setiap orang mempunyai rasa takut, tetapi ketidak beranian menghadapi rasa takut tidak pernah dapat menyelesaikannya bahkan sebaliknya, hanya akan memberi kesempatan kepada rasa takut itu untuk bertumbuh"

 
Other things
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis ligula lorem, consequat eget, tristique nec, auctor quis, purus. Vivamus ut sem. Fusce aliquam nunc vitae purus.
Other things
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis ligula lorem, consequat eget, tristique nec, auctor quis, purus. Vivamus ut sem. Fusce aliquam nunc vitae purus.
Other things
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis ligula lorem, consequat eget, tristique nec, auctor quis, purus. Vivamus ut sem. Fusce aliquam nunc vitae purus.
Other things
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis ligula lorem, consequat eget, tristique nec, auctor quis, purus. Vivamus ut sem. Fusce aliquam nunc vitae purus.
Other things
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis ligula lorem, consequat eget, tristique nec, auctor quis, purus. Vivamus ut sem. Fusce aliquam nunc vitae purus.
VB 4 Aqyuew
Rabu, Maret 25, 2009

Lah nie baru yang ke-4. Wow akhirnya. Hehehehehe........
Option ExplicitDim days As Long '<-Stores the number of days elapsed from 1/1/1900 to current month and yearDim i As Integer Private Sub cmdGenerate_Click()On Error GoTo Error_handle 'On error, goto to end of functiondays = 0For i = 0 To 34 Label1(i).Caption = "" 'Clear all the labelsNext i For i = 1900 To txtYear.Text - 1 If i Mod 4 = 0 Then 'If leap year then count 366 days days = days + 366 Else 'else 365 days days = days + 365 End IfNext i For i = 1 To txtMonth.Text - 1 If i = 1 Or i = 3 Or i = 5 Or i = 7 Or i = 8 Or i = 10 Or i = 12 Then 'For January,March,May....,December count 31 days days = days + 31 ElseIf (i = 4 Or i = 6 Or i = 9 Or i = 11) Then 'For April,June,September,November count 30 days days = days + 30 ElseIf (i = 2 And txtYear.Text Mod 4 = 0) Then 'If month is February and year is leap year count 29 days days = days + 29 Else 'If month is February and year is not a leap year, count 28 days days = days + 28 End If Next i If (i = 1 Or i = 3 Or i = 5 Or i = 7 Or i = 8 Or i = 10 Or i = 12) Then show_calender 31 'Show calender with 31 days ElseIf (i = 4 Or i = 6 Or i = 9 Or i = 11) Then show_calender 30 'Show calender with 30 days ElseIf (i = 2 And txtYear.Text Mod 4 = 0) Then show_calender 29 'Show calender with 29 days Else show_calender 28 'Show calender with 28 days End IfError_handle:End Sub Private Function show_calender(n As Integer) '//<- n stores the number of days to displayDim i, k As Integerk = days Mod 7 'Divide days with 7, the remainder give the current dayFor i = 1 To n Label1(k).Caption = i 'Display the number in calender format k = k + 1 If k = 35 Then k = 0Next iEnd Function
posted by Winn_Doeell @ 4:35:00 AM  
0 Comments:

Posting Komentar

<< Home
 
About Me

Name: Winn_Doeell
Home: Malang, Jatim, Indonesia
About Me: Nama Q Windoel. hehehe Q pemlu tapi Q cew yang ceria. Q sebenarnya gk suka dapet masalah. Mbenceknoo.............. hahahahahah............... Q sayang ma orang2 di sekitar Q. Q kan membahagiakan ortu Q. hahahaha...........
See my complete profile
Previous Post
Archives
Links
Powered by

BLOGGER

© 2006 Catatan "Winn_Doeell" .Blogger Templates by Isnaini and Cool Cars Pictures