📄 ccc.frm
字号:
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 6
Left = 3240
TabIndex = 5
Top = 2280
Width = 735
End
Begin VB.CommandButton Command5
BackColor = &H000000FF&
Caption = "5"
BeginProperty Font
Name = "隶书"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 5
Left = 4200
TabIndex = 4
Top = 2280
Width = 735
End
Begin VB.CommandButton Command15
Caption = "CE"
BeginProperty Font
Name = "隶书"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 4
Left = 6000
TabIndex = 3
Top = 2280
Width = 735
End
Begin VB.CommandButton Command1
Caption = "1"
BeginProperty Font
Name = "隶书"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 3
Left = 3240
TabIndex = 2
Top = 3000
Width = 735
End
Begin VB.CommandButton Command2
Caption = "2"
BeginProperty Font
Name = "隶书"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 2
Left = 4200
TabIndex = 1
Top = 3000
Width = 735
End
Begin VB.CommandButton Command7
Caption = "7"
BeginProperty Font
Name = "隶书"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 0
Left = 3240
TabIndex = 0
Top = 1560
Width = 735
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(Index As Integer)
Text1 = Text1 & "1"
If Abs(Val(Text1)) >= 1 Then
Text1 = Val(Text1)
End If
End Sub
Private Sub Command10_Click(Index As Integer)
Text1 = Text1 & "0"
End Sub
Private Sub Command11_Click(Index As Integer)
If InStr(Text1, ".") = 0 And Text1 <> "" And Text1 <> "-" Then
Text1 = Text1 + "."
End If
End Sub
Private Sub Command12_Click(Index As Integer)
End
End Sub
Private Sub Command13_Click(Index As Integer)
If Text1 <> "" Then
Text1 = Mid(Text1, 1, Len(Text1) - 1)
End If
End Sub
Private Sub Command14_Click(Index As Integer)
If Mid(Text1, 1, 1) = "-" Then
Text1 = Mid(Text1, 2, Len(Text1) - 1)
Else: Text1 = "-" + Text1
End If
End Sub
Private Sub Command15_Click(Index As Integer)
Text1 = ""
End Sub
Private Sub Command16_Click(Index As Integer)
Text1 = ""
End Sub
Private Sub Command17_Click(Index As Integer)
If Text1 <> "" Then
Text1 = Sin(Val(Text1))
If Mid(Text1, 1, 1) = "." Then
Text1 = "0" & Text1
ElseIf Mid(Text1, 1, 2) = "-." Then
Text1 = "-0" & Mid(Text1, 2, Len(Text1) - 1)
End If
End If
End Sub
Private Sub Command18_Click(Index As Integer)
If Text1 <> "" Then
Text1 = Cos(Val(Text1))
If Mid(Text1, 1, 1) = "." Then
Text1 = "0" & Text1
ElseIf Mid(Text1, 1, 2) = "-." Then
Text1 = "-0" & Mid(Text1, 2, Len(Text1) - 1)
End If
End If
End Sub
Private Sub Command19_Click(Index As Integer)
If Text1 <> "" Then
Text1 = Tan(Val(Text1))
If Mid(Text1, 1, 1) = "." Then
Text1 = "0" & Text1
ElseIf Mid(Text1, 1, 2) = "-." Then
Text1 = "-0" & Mid(Text1, 2, Len(Text1) - 1)
End If
End If
End Sub
Private Sub Command2_Click(Index As Integer)
Text1 = Text1 & "2"
If Abs(Val(Text1)) >= 1 Then
Text1 = Val(Text1)
End If
End Sub
Private Sub Command20_Click(Index As Integer)
If Text1 <> "" Then
Text1 = Sgn(Val(Text1))
End If
End Sub
Private Sub Command21_Click(Index As Integer)
If Text1 <> "" Then
If Val(Text1) > 0 Then
Text1 = Log(Val(Text1))
Else: x = MsgBox("输入的数据错误", vbOKOnly, "信息提示")
End If
If Mid(Text1, 1, 1) = "." Then
Text1 = "0" & Text1
ElseIf Mid(Text1, 1, 2) = "-." Then
Text1 = "-0" & Mid(Text1, 2, Len(Text1) - 1)
End If
End If
End Sub
Private Sub Command22_Click(Index As Integer)
If Text1 <> "" Then
If Text1 < 0 Then
MsgBox ("输入的数据错误")
Else: Text1 = Sqr(Text1)
If Mid(Text1, 1, 1) = "." Then
Text1 = "0" & Text1
ElseIf Mid(Text1, 1, 2) = "-." Then
Text1 = "-0" & Mid(Text1, 2, Len(Text1) - 1)
End If
End If
End If
End Sub
Private Sub Command23_Click(Index As Integer)
If Text1 <> "" Then
Text1 = Exp(Text1)
If Mid(Text1, 1, 1) = "." Then
Text1 = "0" & Text1
ElseIf Mid(Text1, 1, 2) = "-." Then
Text1 = "-0" & Mid(Text1, 2, Len(Text1) - 1)
End If
End If
End Sub
Private Sub Command24_Click(Index As Integer)
If Text1 <> "" Then
Text1 = Text1 ^ 2
If Mid(Text1, 1, 1) = "." Then
Text1 = "0" & Text1
ElseIf Mid(Text1, 1, 2) = "-." Then
Text1 = "-0" & Mid(Text1, 2, Len(Text1) - 1)
End If
End If
End Sub
Private Sub Command25_Click(Index As Integer)
If Text1 <> "" Then
If Text1 = 0 Then
MsgBox ("输入的数据错误")
Else
Text1 = 1 / Text1
If Mid(Text1, 1, 1) = "." Then
Text1 = "0" & Text1
ElseIf Mid(Text1, 1, 2) = "-." Then
Text1 = "-0" & Mid(Text1, 2, Len(Text1) - 1)
End If
End If
End If
End Sub
Private Sub Command26_Click(Index As Integer)
If Text1 <> "" Then
Text1 = Oct(Val(Text1))
End If
End Sub
Private Sub Command27_Click(Index As Integer)
If Text1 <> "" Then
Text1 = Hex(Val(Text1))
End If
End Sub
Private Sub Command28_Click(Index As Integer)
If Text1 <> "" Then
Text1 = Abs(Val(Text1))
If Mid(Text1, 1, 1) = "." Then
Text1 = "0" & Text1
ElseIf Mid(Text1, 1, 2) = "-." Then
Text1 = "-0" & Mid(Text1, 2, Len(Text1) - 1)
End If
End If
End Sub
Private Sub Command3_Click(Index As Integer)
Text1 = Text1 & "3"
If Abs(Val(Text1)) >= 1 Then
Text1 = Val(Text1)
End If
End Sub
Private Sub Command4_Click(Index As Integer)
Text1 = Text1 & "4"
If Abs(Val(Text1)) >= 1 Then
Text1 = Val(Text1)
End If
End Sub
Private Sub Command5_Click(Index As Integer)
Text1 = Text1 & "5"
If Abs(Val(Text1)) >= 1 Then
Text1 = Val(Text1)
End If
End Sub
Private Sub Command6_Click(Index As Integer)
Text1 = Text1 & "6"
If Abs(Val(Text1)) >= 1 Then
Text1 = Val(Text1)
End If
End Sub
Private Sub Command7_Click(Index As Integer)
Text1 = Text1 & "7"
If Abs(Val(Text1)) >= 1 Then
Text1 = Val(Text1)
End If
End Sub
Private Sub Command8_Click(Index As Integer)
Text1 = Text1 & "8"
If Abs(Val(Text1)) >= 1 Then
Text1 = Val(Text1)
End If
End Sub
Private Sub Command9_Click(Index As Integer)
Text1 = Text1 & "9"
If Abs(Val(Text1)) >= 1 Then
Text1 = Val(Text1)
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -