📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "判断闰年"
ClientHeight = 1380
ClientLeft = 60
ClientTop = 345
ClientWidth = 3330
LinkTopic = "Form1"
ScaleHeight = 1380
ScaleWidth = 3330
StartUpPosition = 1 '所有者中心
Begin VB.CommandButton Command2
Caption = "退出"
Height = 390
Left = 975
TabIndex = 1
Top = 765
Width = 1380
End
Begin VB.CommandButton Command1
Caption = "判断"
Height = 390
Left = 975
TabIndex = 0
Top = 240
Width = 1380
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
'定义两个变量
Dim year As Integer
Dim myval As Boolean
year = InputBox("请输入年", "闰年判断")
'显示输入框
If (year Mod 400) = 0 Then
myval = True
MsgBox "此年为闰年", vbInformation, "闰年判断"
Else
myval = False
MsgBox "此年不是闰年", vbInformation, "闰年判断"
End If
End Sub
Private Sub Command2_Click()
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -