VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "四则运算器"
   ClientHeight    =   5865
   ClientLeft      =   120
   ClientTop       =   450
   ClientWidth     =   7065
   LinkTopic       =   "Form1"
   ScaleHeight     =   5865
   ScaleWidth      =   7065
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command4 
      Caption         =   "除"
      Height          =   495
      Left            =   4560
      TabIndex        =   10
      Top             =   4920
      Width           =   855
   End
   Begin VB.CommandButton Command3 
      Caption         =   "乘"
      Height          =   495
      Left            =   4560
      TabIndex        =   9
      Top             =   4080
      Width           =   855
   End
   Begin VB.CommandButton Command2 
      Caption         =   "减"
      Height          =   495
      Left            =   4560
      TabIndex        =   8
      Top             =   3240
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "加"
      Height          =   495
      Left            =   4560
      TabIndex        =   7
      Top             =   2400
      Width           =   855
   End
   Begin VB.TextBox Text3 
      Height          =   615
      Left            =   2160
      TabIndex        =   6
      Top             =   4320
      Width           =   1455
   End
   Begin VB.TextBox Text2 
      Height          =   615
      Left            =   2160
      TabIndex        =   5
      Top             =   3240
      Width           =   1455
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Left            =   2160
      TabIndex        =   4
      Top             =   2400
      Width           =   1455
   End
   Begin VB.Label Label4 
      Caption         =   "结果"
      Height          =   495
      Left            =   1200
      TabIndex        =   3
      Top             =   4320
      Width           =   735
   End
   Begin VB.Label Label3 
      Caption         =   "数2"
      Height          =   375
      Left            =   1320
      TabIndex        =   2
      Top             =   3240
      Width           =   615
   End
   Begin VB.Label Label2 
      Caption         =   "数1"
      Height          =   375
      Left            =   1320
      TabIndex        =   1
      Top             =   2400
      Width           =   495
   End
   Begin VB.Label Label1 
      Caption         =   "请输入两个数"
      Height          =   375
      Left            =   1320
      TabIndex        =   0
      Top             =   1440
      Width           =   2655
   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()
x = Val(Text1.Text)
y = Val(Text2.Text)
Text3.Text = Str(x + y)
End Sub


Private Sub Command2_Click()
x = Val(Text1.Text)
y = Val(Text2.Text)
Text3.Text = Str(x - y)
End Sub

Private Sub Command3_Click()
x = Val(Text1.Text)
y = Val(Text2.Text)
Text3.Text = Str(x * y)
End Sub

Private Sub Command4_Click()
x = Val(Text1.Text)
y = Val(Text2.Text)
Text3.Text = Str(x / y)
End Sub
