📄 if_then1.frm
字号:
VERSION 5.00
Begin VB.Form if_then1
Caption = "一年级加法练习"
ClientHeight = 2865
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 2865
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command3
BackColor = &H00FF00FF&
Caption = "结束"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3120
TabIndex = 9
Top = 2160
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "开始"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 120
TabIndex = 8
Top = 2160
Width = 1215
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 360
TabIndex = 5
Top = 360
Width = 615
End
Begin VB.CommandButton Command2
Caption = "核对"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1560
TabIndex = 3
Top = 2160
Width = 1215
End
Begin VB.TextBox Text3
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3000
TabIndex = 2
Top = 360
Width = 735
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1560
TabIndex = 0
Top = 360
Width = 615
End
Begin VB.Label Label4
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1080
TabIndex = 7
Top = 1320
Width = 3015
End
Begin VB.Label Label3
Caption = "结果:"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 120
TabIndex = 6
Top = 1320
Width = 855
End
Begin VB.Label Label1
Caption = "+"
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1200
TabIndex = 4
Top = 480
Width = 375
End
Begin VB.Label Label2
Caption = "="
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2520
TabIndex = 1
Top = 480
Width = 375
End
End
Attribute VB_Name = "if_then1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Text3.Text = ""
Randomize
Text1.Text = Val(Int(Rnd * 101))
Text2.Text = Val(Int(Rnd * 101))
Command2.SetFocus
Text3.Text = Val(InputBox("请输入计算的结果:"))
End Sub
Private Sub Command2_Click()
If Val(Text3.Text) = Val(Text1.Text) + Val(Text2.Text) Then
Label4.Caption = "很好,答对了! "
Else
Label4.Caption = "做错了,再来一次吧!"
End If
End Sub
Private Sub Command3_Click()
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -