等价类(加法器).frm

来自「该文件包含一些关于软件的知识,里面有一些比较经典的东西,值得大家去卡看.」· FRM 代码 · 共 90 行

FRM
90
字号
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "两位数加法器"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5235
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   5235
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox Text1 
      Appearance      =   0  'Flat
      Height          =   495
      Left            =   1440
      TabIndex        =   6
      Top             =   720
      Width           =   2055
   End
   Begin VB.TextBox Text2 
      Appearance      =   0  'Flat
      Height          =   495
      Left            =   1440
      TabIndex        =   5
      Top             =   1560
      Width           =   2055
   End
   Begin VB.CommandButton Command1 
      Appearance      =   0  'Flat
      Caption         =   "加"
      Height          =   495
      Left            =   3720
      TabIndex        =   4
      Top             =   2040
      Width           =   1215
   End
   Begin VB.TextBox Text3 
      Appearance      =   0  'Flat
      Height          =   495
      Left            =   1440
      TabIndex        =   3
      Top             =   2520
      Width           =   2055
   End
   Begin VB.Label Label1 
      Caption         =   "和"
      Height          =   375
      Index           =   2
      Left            =   120
      TabIndex        =   2
      Top             =   2640
      Width           =   975
   End
   Begin VB.Label Label1 
      Caption         =   "请输入第二个数值"
      Height          =   375
      Index           =   1
      Left            =   120
      TabIndex        =   1
      Top             =   1680
      Width           =   975
   End
   Begin VB.Label Label1 
      Caption         =   "请输入第一个数值"
      Height          =   375
      Index           =   0
      Left            =   120
      TabIndex        =   0
      Top             =   720
      Width           =   975
   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()
If Val(Text1.Text) >= 99 Or Val(Text1.Text) <= -99 Then
MsgBox ("输入的参数值必须大于-99同时小于99")
Else
If Val(Text2.Text) >= 99 Or Val(Text2.Text) <= -99 Then
MsgBox ("输入的参数值必须大于-99同时小于99")
Else
Text3.Text = Val(Text1.Text) + Val(Text2.Text)
End If
End If

End Sub

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?