visual basic编程,如图所示,点击右下角的窗体弹出上面两个对话框,对话框输入字符确定后
visualbasic编程,如图所示,点击右下角的窗体弹出上面两个对话框,对话框输入字符确定后出现在窗体文本框中,点击计算出现右下角窗体,求大神解答,在线等...
visual basic编程,如图所示,点击右下角的窗体弹出上面两个对话框,对话框输入字符确定后出现在窗体文本框中,点击计算出现右下角窗体,求大神解答,在线等
展开
展开全部
Day(DateSerial(年,月+1, 0))就是年月天数
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Dim y As Integer, m As Integer
Private Sub Command1_Click()
Select Case m
Case 1, 3, 5, 7, 8, 10, 12
d = 31
Case 4, 6, 9, 11
d = 30
Case 2
If y Mod 4 = 0 And y Mod 100 > 0 Or y Mod 400 = 0 Then d = 29 Else d = 28
End Select
MsgBox (y & "年" & m & "月有" & d & "天")
End Sub
Private Sub Form_Click()
y = CInt(InputBox("请输入年号:"))
Text1 = y
m = CInt(InputBox("请输入月份:"))
Text2 = m
End Sub
Private Sub Form_Load()
Text1 = ""
Text2 = ""
End Sub
Private Sub Command1_Click()
Select Case m
Case 1, 3, 5, 7, 8, 10, 12
d = 31
Case 4, 6, 9, 11
d = 30
Case 2
If y Mod 4 = 0 And y Mod 100 > 0 Or y Mod 400 = 0 Then d = 29 Else d = 28
End Select
MsgBox (y & "年" & m & "月有" & d & "天")
End Sub
Private Sub Form_Click()
y = CInt(InputBox("请输入年号:"))
Text1 = y
m = CInt(InputBox("请输入月份:"))
Text2 = m
End Sub
Private Sub Form_Load()
Text1 = ""
Text2 = ""
End Sub
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询