form1.frm

来自「上传的包含两个文件」· FRM 代码 · 共 152 行

FRM
152
字号
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command3 
      Caption         =   "清空"
      Height          =   375
      Left            =   3480
      TabIndex        =   8
      Top             =   1080
      Width           =   735
   End
   Begin VB.CommandButton Command2 
      Caption         =   "/"
      Height          =   495
      Index           =   3
      Left            =   3600
      TabIndex        =   7
      Top             =   2520
      Width           =   495
   End
   Begin VB.CommandButton Command2 
      Caption         =   "*"
      Height          =   495
      Index           =   2
      Left            =   2520
      TabIndex        =   6
      Top             =   2520
      Width           =   495
   End
   Begin VB.CommandButton Command2 
      Caption         =   "-"
      Height          =   495
      Index           =   1
      Left            =   1440
      TabIndex        =   5
      Top             =   2520
      Width           =   495
   End
   Begin VB.CommandButton Command2 
      Caption         =   "+"
      Height          =   495
      Index           =   0
      Left            =   240
      TabIndex        =   4
      Top             =   2520
      Width           =   495
   End
   Begin VB.CommandButton Command1 
      Caption         =   "计算"
      Height          =   375
      Left            =   3480
      TabIndex        =   3
      Top             =   1800
      Width           =   735
   End
   Begin VB.TextBox Text1 
      BackColor       =   &H008080FF&
      Height          =   495
      Left            =   720
      TabIndex        =   2
      Top             =   240
      Width           =   2895
   End
   Begin MSComctlLib.Slider Slider1 
      Height          =   255
      Left            =   600
      TabIndex        =   0
      Top             =   1080
      Width           =   2415
      _ExtentX        =   4260
      _ExtentY        =   450
      _Version        =   393216
      LargeChange     =   10
      Max             =   100
      TickStyle       =   2
   End
   Begin MSComctlLib.Slider Slider2 
      Height          =   255
      Left            =   600
      TabIndex        =   1
      Top             =   1680
      Width           =   2415
      _ExtentX        =   4260
      _ExtentY        =   450
      _Version        =   393216
      LargeChange     =   10
      Max             =   100
      TickStyle       =   2
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public a, b, c As Integer
Private Sub Command1_Click()
Select Case c
Case 1
Text1.Text = a + b
Case 2
Text1.Text = a - b
Case 3
Text1.Text = a * b
Case 4
Text1.Text = a / b

End Select

End Sub

Private Sub Command2_Click(Index As Integer)
 Select Case Index
 Case 0
 c = 1
 Case 1
 c = 2
 Case 2
 c = 3
 Case 3
 c = 4
 End Select
 
End Sub

Private Sub Command3_Click()
a = 0
b = 0
c = 0
Text1.Text = ""
End Sub

Private Sub Slider1_Click()
a = Slider1.Value
Text1.Text = Slider1.Value
End Sub

Private Sub Slider2_scroll()
b = Slider2.Value
Text1.Text = Slider2.Value

End Sub

⌨️ 快捷键说明

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