Public Class Form1
Public n As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim y, m, d As Integer
Dim flag As Boolean
y = CInt(TextBox1.Text)
m = CInt(TextBox2.Text)
If (y Mod 4 = 0 And y Mod 100 <> 0) Or (y Mod 400 = 0) Then
flag = True
Else
flag = False
End If
Select Case m
Case CInt(m >= 3 And m <= 5)
n = "春季"
Case CInt(m >= 6 And m <= 8)
n = "夏季"
Case CInt(m >= 9 And m <= 11)
n = "秋季"
Case CInt(m = 12 Or m = 1 Or m = 2)
n = "冬季"
End Select
Select Case m = 2
Case m Mod 2 = 0
d = 30
Case Else
d = 31
End Select
Label3.Text = CStr(y) & "年" & "闰年" & Chr(100) & _
CStr(m) & "月有" & CStr(d) & "天" & ",在" & n
End Sub
End Class