practice5_6.frm
来自「深圳大学的vb上机与教学的课件」· FRM 代码 · 共 138 行
FRM
138 行
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 2490
ClientLeft = 60
ClientTop = 450
ClientWidth = 3405
LinkTopic = "Form1"
ScaleHeight = 2490
ScaleWidth = 3405
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox Text3
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1800
TabIndex = 5
Top = 1680
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "该月天数"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 360
TabIndex = 4
Top = 1680
Width = 1215
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1800
TabIndex = 3
Top = 960
Width = 1215
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1800
TabIndex = 0
Top = 240
Width = 1215
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "月份:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 960
TabIndex = 2
Top = 1080
Width = 735
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "年份:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 960
TabIndex = 1
Top = 480
Width = 735
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 Ynum As Integer, Mnum As Integer
Ynum = Val(Text1.Text)
Mnum = Val(Text2.Text)
Select Case Mnum
Case 1, 3, 5, 7, 8, 10, 12
Text3.Text = 31
Case 4, 6, 9, 11
Text3.Text = 30
Case 2
If Ynum Mod 4 = 0 And Ynum Mod 100 <> 0 Or Ynum Mod 400 = 0 Then
Text3.Text = 29
Else
Text3.Text = 28
End If
End Select
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?