⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 zfy.frm

📁 上传的包含两个文件
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   4710
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   5790
   LinkTopic       =   "Form1"
   ScaleHeight     =   4710
   ScaleWidth      =   5790
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command7 
      Caption         =   "清空 "
      Height          =   375
      Left            =   3360
      TabIndex        =   16
      Top             =   3720
      Width           =   735
   End
   Begin VB.CommandButton Command6 
      Caption         =   "="
      Height          =   375
      Left            =   2040
      TabIndex        =   15
      Top             =   3720
      Width           =   735
   End
   Begin VB.CommandButton Command5 
      Caption         =   "/"
      Height          =   495
      Left            =   4680
      TabIndex        =   14
      Top             =   3720
      Width           =   615
   End
   Begin VB.CommandButton Command4 
      Caption         =   "*"
      Height          =   495
      Left            =   4680
      TabIndex        =   13
      Top             =   2880
      Width           =   615
   End
   Begin VB.CommandButton Command3 
      Caption         =   "-"
      Height          =   495
      Left            =   4680
      TabIndex        =   12
      Top             =   2040
      Width           =   615
   End
   Begin VB.CommandButton Command2 
      Caption         =   "+"
      Height          =   495
      Left            =   4680
      TabIndex        =   11
      Top             =   1200
      Width           =   615
   End
   Begin VB.TextBox Text1 
      Height          =   615
      Left            =   840
      TabIndex        =   10
      Top             =   480
      Width           =   4455
   End
   Begin VB.CommandButton Command1 
      Caption         =   "9"
      Height          =   375
      Index           =   9
      Left            =   3360
      TabIndex        =   9
      Top             =   2880
      Width           =   690
   End
   Begin VB.CommandButton Command1 
      Caption         =   "8"
      Height          =   375
      Index           =   8
      Left            =   2040
      TabIndex        =   8
      Top             =   2880
      Width           =   690
   End
   Begin VB.CommandButton Command1 
      Caption         =   "7"
      Height          =   375
      Index           =   7
      Left            =   840
      TabIndex        =   7
      Top             =   2880
      Width           =   690
   End
   Begin VB.CommandButton Command1 
      Caption         =   "6"
      Height          =   375
      Index           =   6
      Left            =   3360
      TabIndex        =   6
      Top             =   2040
      Width           =   690
   End
   Begin VB.CommandButton Command1 
      Caption         =   "5"
      Height          =   375
      Index           =   5
      Left            =   2040
      TabIndex        =   5
      Top             =   2040
      Width           =   690
   End
   Begin VB.CommandButton Command1 
      Caption         =   "4"
      Height          =   375
      Index           =   4
      Left            =   840
      TabIndex        =   4
      Top             =   2040
      Width           =   690
   End
   Begin VB.CommandButton Command1 
      Caption         =   "3"
      Height          =   375
      Index           =   3
      Left            =   3360
      TabIndex        =   3
      Top             =   1200
      Width           =   690
   End
   Begin VB.CommandButton Command1 
      Caption         =   "2"
      Height          =   375
      Index           =   2
      Left            =   2040
      TabIndex        =   2
      Top             =   1200
      Width           =   690
   End
   Begin VB.CommandButton Command1 
      Caption         =   "1"
      Height          =   375
      Index           =   1
      Left            =   840
      TabIndex        =   1
      Top             =   1200
      Width           =   690
   End
   Begin VB.CommandButton Command1 
      Caption         =   "0"
      Height          =   375
      Index           =   0
      Left            =   840
      TabIndex        =   0
      Top             =   3720
      Width           =   690
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim num1 As Integer, num2 As Integer, i As Integer
Private Sub Command1_Click(Index As Integer)
Text1.Text = Text1.Text + Command1(Index).Caption
End Sub

Private Sub Command2_Click()

If i Mod 2 = 0 Then num1 = Val(Text1.Text): i = i + 1: num1 = num1 + num2: Text1.Text = "" 'num1
If i Mod 2 <> 0 Then num2 = Val(Text1.Text): num2 = num1 + num2: i = i + 1: Text1.Text = "" ' num2
'Text1.Text = ""
End Sub

Private Sub Command3_Click()
'Text1.Text = ""
If i Mod 2 = 0 Then num1 = Val(Text1.Text): i = i + 1: num1 = num1 - num2: Text1.Text = "" ' num1
If i Mod 2 <> 0 Then num2 = Val(Text1.Text): num2 = num1 - num2: i = i + 1: Text1.Text = "" 'num2
'Text1.Text = ""
End Sub

Private Sub Command4_Click()
'Text1.Text = ""
If i Mod 2 = 0 Then num1 = Val(Text1.Text): i = i + 1: num1 = num1 * num2: Text1.Text = "" 'num1
If i Mod 2 <> 0 Then num2 = Val(Text1.Text): num2 = num1 * num2: i = i + 1: Text1.Text = "" 'num2
'Text1.Text = ""
End Sub

Private Sub Command5_Click()
'Text1.Text = ""
If i Mod 2 = 0 Then num1 = Val(Text1.Text): i = i + 1: num1 = num1 / num2: Text1.Text = "" ' num1
If i Mod 2 <> 0 Then num2 = Val(Text1.Text): num2 = num1 / num2: i = i + 1: Text1.Text = num2
'ext1.Text = ""
End Sub

Private Sub Command6_Click()
If i Mod 2 = 0 Then num1 = Val(Text1.Text):
num2 = Val(Text1.Text)
num2 = num1 + num2
Text1.Text = num2
End Sub

Private Sub Command7_Click()
Text1.Text = ""
End Sub

Private Sub Form_Load()
num1 = 0
num2 = 0
i = 0
End Sub

⌨️ 快捷键说明

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