📄 jisuan_frm.frm
字号:
VERSION 5.00
Begin VB.Form jisuan_frm
BackColor = &H00400000&
Caption = "属于你的计算器"
ClientHeight = 5010
ClientLeft = 7305
ClientTop = 3405
ClientWidth = 4515
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 5010
ScaleWidth = 4515
Begin VB.CommandButton Command18
BackColor = &H00FFC0C0&
Caption = "退出"
Height = 495
Left = 2400
Style = 1 'Graphical
TabIndex = 18
Top = 4200
Width = 1695
End
Begin VB.CommandButton Command17
BackColor = &H00FFC0C0&
Caption = "清空"
Height = 495
Left = 360
Style = 1 'Graphical
TabIndex = 17
Top = 4200
Width = 1695
End
Begin VB.CommandButton Command16
BackColor = &H00FFC0C0&
Caption = "/"
Height = 495
Left = 3360
Style = 1 'Graphical
TabIndex = 16
Top = 3360
Width = 735
End
Begin VB.CommandButton Command15
BackColor = &H00FFC0C0&
Caption = "x"
Height = 495
Left = 3360
Style = 1 'Graphical
TabIndex = 15
Top = 2640
Width = 735
End
Begin VB.CommandButton Command14
BackColor = &H00FFC0C0&
Caption = "="
Height = 495
Left = 2400
Style = 1 'Graphical
TabIndex = 14
Top = 3360
Width = 735
End
Begin VB.CommandButton Command13
BackColor = &H00FFC0C0&
Caption = "-"
Height = 495
Left = 3360
Style = 1 'Graphical
TabIndex = 13
Top = 1920
Width = 735
End
Begin VB.CommandButton Command12
BackColor = &H00FFC0C0&
Caption = "+"
Height = 495
Left = 3360
Style = 1 'Graphical
TabIndex = 12
Top = 1200
Width = 735
End
Begin VB.CommandButton Command11
BackColor = &H00FFC0C0&
Caption = "."
Height = 495
Left = 360
Style = 1 'Graphical
TabIndex = 11
Top = 3360
Width = 735
End
Begin VB.CommandButton Command10
BackColor = &H00FFC0C0&
Caption = "0"
Height = 495
Left = 1320
Style = 1 'Graphical
TabIndex = 10
Top = 3360
Width = 735
End
Begin VB.CommandButton Command9
BackColor = &H00FFC0C0&
Caption = "9"
Height = 495
Left = 2400
Style = 1 'Graphical
TabIndex = 9
Top = 2640
Width = 735
End
Begin VB.CommandButton Command8
BackColor = &H00FFC0C0&
Caption = "8"
Height = 495
Left = 1320
Style = 1 'Graphical
TabIndex = 8
Top = 2640
Width = 735
End
Begin VB.CommandButton Command7
BackColor = &H00FFC0C0&
Caption = "7"
Height = 495
Left = 360
Style = 1 'Graphical
TabIndex = 7
Top = 2640
Width = 735
End
Begin VB.CommandButton Command6
BackColor = &H00FFC0C0&
Caption = "6"
Height = 495
Left = 2400
Style = 1 'Graphical
TabIndex = 6
Top = 1920
Width = 735
End
Begin VB.CommandButton Command5
BackColor = &H00FFC0C0&
Caption = "5"
Height = 495
Left = 1320
Style = 1 'Graphical
TabIndex = 5
Top = 1920
Width = 735
End
Begin VB.CommandButton Command4
BackColor = &H00FFC0C0&
Caption = "4"
Height = 495
Left = 360
Style = 1 'Graphical
TabIndex = 4
Top = 1920
Width = 735
End
Begin VB.CommandButton Command3
BackColor = &H00FFC0C0&
Caption = "3"
Height = 495
Left = 2400
Style = 1 'Graphical
TabIndex = 3
Top = 1200
Width = 735
End
Begin VB.CommandButton Command2
BackColor = &H00FFC0C0&
Caption = "2"
Height = 495
Left = 1320
Style = 1 'Graphical
TabIndex = 2
Top = 1200
Width = 735
End
Begin VB.CommandButton Command1
BackColor = &H00FFC0C0&
Caption = "1"
Height = 495
Left = 360
Style = 1 'Graphical
TabIndex = 1
Top = 1200
Width = 735
End
Begin VB.TextBox Text1
BackColor = &H00C0E0FF&
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 495
Left = 480
TabIndex = 0
Top = 360
Width = 3615
End
Begin VB.Image Image1
Height = 480
Left = 0
Picture = "jisuan_frm.frx":0000
Top = 0
Width = 480
End
End
Attribute VB_Name = "jisuan_frm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim i As Double
Dim j As Integer
Private Sub Command1_Click()
Text1.Text = Text1.Text + Command1.Caption
End Sub
Private Sub Command10_Click()
Text1.Text = Text1.Text + Command10.Caption
End Sub
Private Sub Command11_Click()
Text1.Text = Text1.Text + Command11.Caption
End Sub
Private Sub Command12_Click()
i = Val(Text1.Text)
Text1.Text = ""
j = 1
End Sub
Private Sub Command13_Click()
i = Val(Text1.Text)
Text1.Text = ""
j = 2
End Sub
Private Sub Command14_Click()
Select Case j
Case 1
Text1.Text = i + Val(Text1.Text)
Case 2
Text1.Text = i - Val(Text1.Text)
Case 3
Text1.Text = Val(Text1.Text) * i
Case 4
Text1.Text = i / Val(Text1.Text)
End Select
j = 0
End Sub
Private Sub Command15_Click()
i = Val(Text1.Text)
Text1.Text = ""
j = 3
End Sub
Private Sub Command16_Click()
i = Val(Text1.Text)
Text1.Text = ""
j = 4
End Sub
Private Sub Command17_Click()
Text1.Text = ""
End Sub
Private Sub Command18_Click()
Me.Hide
End Sub
Private Sub Command2_Click()
Text1.Text = Text1.Text + Command2.Caption
End Sub
Private Sub Command3_Click()
Text1.Text = Text1.Text + Command3.Caption
End Sub
Private Sub Command4_Click()
Text1.Text = Text1.Text + Command4.Caption
End Sub
Private Sub Command5_Click()
Text1.Text = Text1.Text + Command5.Caption
End Sub
Private Sub Command6_Click()
Text1.Text = Text1.Text + Command6.Caption
End Sub
Private Sub Command7_Click()
Text1.Text = Text1.Text + Command7.Caption
End Sub
Private Sub Command8_Click()
Text1.Text = Text1.Text + Command8.Caption
End Sub
Private Sub Command9_Click()
Text1.Text = Text1.Text + Command9.Caption
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -