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

📄 wll.frm

📁 基于Visual Basic 6.0的计算器设计
💻 FRM
字号:
VERSION 5.00
Begin VB.Form WLL 
   Caption         =   "简单计算器"
   ClientHeight    =   3255
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   7470
   LinkTopic       =   "Form1"
   ScaleHeight     =   3255
   ScaleWidth      =   7470
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton WLLCommand1 
      Caption         =   "Rnd"
      Height          =   615
      Index           =   24
      Left            =   3000
      TabIndex        =   26
      Top             =   2520
      Width           =   855
   End
   Begin VB.CommandButton WLLCommand1 
      Caption         =   "SQRT"
      Height          =   615
      Index           =   23
      Left            =   120
      TabIndex        =   25
      Top             =   2520
      Width           =   855
   End
   Begin VB.CommandButton WLLCommand1 
      Caption         =   "1/X"
      Height          =   615
      Index           =   22
      Left            =   1080
      TabIndex        =   24
      Top             =   2520
      Width           =   855
   End
   Begin VB.CommandButton WLLCommand1 
      Caption         =   "X^2"
      Height          =   615
      Index           =   21
      Left            =   2040
      TabIndex        =   23
      Top             =   2520
      Width           =   855
   End
   Begin VB.CommandButton WLLCommand1 
      Caption         =   "SIN"
      Height          =   615
      Index           =   20
      Left            =   120
      TabIndex        =   22
      Top             =   1800
      Width           =   855
   End
   Begin VB.CommandButton WLLCommand1 
      Caption         =   "COS"
      Height          =   615
      Index           =   19
      Left            =   1080
      TabIndex        =   21
      Top             =   1800
      Width           =   855
   End
   Begin VB.CommandButton WLLCommand1 
      Caption         =   "TAN"
      Height          =   615
      Index           =   18
      Left            =   2040
      TabIndex        =   20
      Top             =   1800
      Width           =   855
   End
   Begin VB.CommandButton WLLCommand1 
      Caption         =   "Log"
      Height          =   615
      Index           =   17
      Left            =   3000
      TabIndex        =   19
      Top             =   1800
      Width           =   855
   End
   Begin VB.CommandButton WLLCommand1 
      Caption         =   "+"
      Height          =   495
      Index           =   16
      Left            =   6600
      TabIndex        =   18
      Top             =   2640
      Width           =   735
   End
   Begin VB.CommandButton WLLCommand1 
      Caption         =   "."
      Height          =   495
      Index           =   15
      Left            =   4920
      TabIndex        =   17
      Top             =   2640
      Width           =   735
   End
   Begin VB.CommandButton WLLCommand1 
      Caption         =   "="
      Height          =   495
      Index           =   14
      Left            =   5760
      TabIndex        =   16
      Top             =   2640
      Width           =   735
   End
   Begin VB.CommandButton WLLCommand1 
      Caption         =   "7"
      Height          =   495
      Index           =   13
      Left            =   4080
      TabIndex        =   15
      Top             =   840
      Width           =   735
   End
   Begin VB.CommandButton WLLCommand1 
      Caption         =   "8"
      Height          =   495
      Index           =   12
      Left            =   4920
      TabIndex        =   14
      Top             =   840
      Width           =   735
   End
   Begin VB.CommandButton WLLCommand1 
      Caption         =   "9"
      Height          =   495
      Index           =   11
      Left            =   5760
      TabIndex        =   13
      Top             =   840
      Width           =   735
   End
   Begin VB.CommandButton WLLCommand1 
      Caption         =   "/"
      Height          =   495
      Index           =   10
      Left            =   6600
      TabIndex        =   12
      Top             =   840
      Width           =   735
   End
   Begin VB.CommandButton WLLCommand1 
      Caption         =   "4"
      Height          =   495
      Index           =   9
      Left            =   4080
      TabIndex        =   11
      Top             =   1440
      Width           =   735
   End
   Begin VB.CommandButton WLLCommand1 
      Caption         =   "5"
      Height          =   495
      Index           =   8
      Left            =   4920
      TabIndex        =   10
      Top             =   1440
      Width           =   735
   End
   Begin VB.CommandButton WLLCommand1 
      Caption         =   "6"
      Height          =   495
      Index           =   7
      Left            =   5760
      TabIndex        =   9
      Top             =   1440
      Width           =   735
   End
   Begin VB.CommandButton WLLCommand1 
      Caption         =   "*"
      Height          =   495
      Index           =   6
      Left            =   6600
      TabIndex        =   8
      Top             =   1440
      Width           =   735
   End
   Begin VB.CommandButton WLLCommand1 
      Caption         =   "1"
      Height          =   495
      Index           =   5
      Left            =   4080
      TabIndex        =   7
      Top             =   2040
      Width           =   735
   End
   Begin VB.CommandButton WLLCommand1 
      Caption         =   "2"
      Height          =   495
      Index           =   4
      Left            =   4920
      TabIndex        =   6
      Top             =   2040
      Width           =   735
   End
   Begin VB.CommandButton WLLCommand1 
      Caption         =   "3"
      Height          =   495
      Index           =   3
      Left            =   5760
      TabIndex        =   5
      Top             =   2040
      Width           =   735
   End
   Begin VB.CommandButton WLLCommand1 
      Caption         =   "-"
      Height          =   495
      Index           =   2
      Left            =   6600
      TabIndex        =   4
      Top             =   2040
      Width           =   735
   End
   Begin VB.CommandButton WLLCommand1 
      Caption         =   "0"
      Height          =   495
      Index           =   1
      Left            =   4080
      TabIndex        =   3
      Top             =   2640
      Width           =   735
   End
   Begin VB.CommandButton WLLCommand1 
      Caption         =   "Cls"
      Height          =   735
      Index           =   0
      Left            =   2880
      TabIndex        =   2
      Top             =   840
      Width           =   975
   End
   Begin VB.TextBox WLLText2 
      Alignment       =   2  'Center
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   18
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   120
      TabIndex        =   1
      Text            =   "科学计算器"
      Top             =   960
      Width           =   2535
   End
   Begin VB.TextBox WLLText1 
      Height          =   495
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   7215
   End
End
Attribute VB_Name = "WLL"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim d As String
Dim a, b, c As Double
Private Sub WLLCommand1_Click(Index As Integer)
Select Case Index
Case 13
WLLText1 = WLLText1 + "7"
Case 12
WLLText1 = WLLText1 + "8"
Case 11
WLLText1 = WLLText1 + "9"
Case 9
WLLText1 = WLLText1 + "4"
Case 8
WLLText1 = WLLText1 + "5"
Case 7
WLLText1 = WLLText1 + "6"
Case 5
WLLText1 = WLLText1 + "1"
Case 4
WLLText1 = WLLText1 + "2"
Case 3
WLLText1 = WLLText1 + "3"
Case 1
WLLText1 = WLLText1 + "0"
Case 15
WLLText1 = WLLText1 + "."
Case 0
WLLText1 = ""
Case 20
WLLText1 = Sin((3.14159 * WLLText1) / 180)
Case 19
WLLText1 = Cos((3.14159 * WLLText1) / 180)
Case 18
WLLText1 = Tan((3.14159 * WLLText1) / 180)
Case 17
WLLText1 = Log(WLLText1)
Case 23
WLLText1 = Sqr(WLLText1)
Case 22
WLLText1 = 1 / WLLText1
Case 21
WLLText1 = WLLText1 ^ 2
Case 24
WLLText1 = Rnd(WLLText1)
Case 10
a = Val(WLLText1)
WLLText1 = ""
d = "/"
Case 6
a = Val(WLLText1)
WLLText1 = ""
d = "*"
Case 2
a = Val(WLLText1)
WLLText1 = ""
d = "-"
Case 16
a = Val(WLLText1)
WLLText1 = ""
d = "+"
Case 14
b = Val(WLLText1)
Select Case d
Case "*"
c = a * b
Case "/"
c = a / b
Case "-"
c = a - b
Case "+"
c = a + b
Case Else
c = ""
End Select
WLLText1.Text = c
a = ""
b = ""
End Select
End Sub

⌨️ 快捷键说明

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