📄 form1.frm
字号:
Top = 960
Width = 615
End
Begin VB.CommandButton Command1
Caption = "+/-"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 10
Left = 1560
TabIndex = 12
Top = 2760
Width = 615
End
Begin VB.CommandButton Command1
Caption = "."
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 11
Left = 2280
TabIndex = 11
Top = 2760
Width = 615
End
Begin VB.CommandButton Command1
Caption = "8"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 8
Left = 1560
TabIndex = 9
Top = 960
Width = 615
End
Begin VB.CommandButton Command1
Caption = "7"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 7
Left = 840
TabIndex = 8
Top = 960
Width = 615
End
Begin VB.CommandButton Command1
Caption = "6"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 6
Left = 2280
TabIndex = 7
Top = 1560
Width = 615
End
Begin VB.CommandButton Command1
Caption = "5"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 5
Left = 1560
TabIndex = 6
Top = 1560
Width = 615
End
Begin VB.CommandButton Command1
Caption = "4"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 4
Left = 840
TabIndex = 5
Top = 1560
Width = 615
End
Begin VB.CommandButton Command1
Caption = "3"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 3
Left = 2280
TabIndex = 4
Top = 2160
Width = 615
End
Begin VB.CommandButton Command1
Caption = "2"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 2
Left = 1560
TabIndex = 3
Top = 2160
Width = 615
End
Begin VB.CommandButton Command1
Caption = "1"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 1
Left = 840
TabIndex = 2
Top = 2160
Width = 615
End
Begin VB.CommandButton Command1
Caption = "0"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 0
Left = 840
TabIndex = 1
Top = 2760
Width = 615
End
Begin VB.TextBox Text1
BackColor = &H00FFFFFF&
Enabled = 0 'False
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 0
MaxLength = 38
TabIndex = 0
Text = " 0."
Top = 0
Width = 4695
End
Begin VB.TextBox Text4
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 360
TabIndex = 31
Text = "Text4"
Top = 2400
Visible = 0 'False
Width = 2295
End
Begin VB.TextBox Text5
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1320
TabIndex = 32
Text = "Text5"
Top = 2400
Visible = 0 'False
Width = 1695
End
Begin VB.TextBox Text3
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = -480
TabIndex = 22
Top = 2280
Visible = 0 'False
Width = 4695
End
Begin VB.Label Label1
BackColor = &H80000009&
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 120
TabIndex = 17
Top = 480
Width = 495
End
Begin VB.Menu 编辑
Caption = "编辑(&E)"
Begin VB.Menu 复制
Caption = "复制(&C)"
Shortcut = ^C
End
Begin VB.Menu 粘贴
Caption = "粘贴(&P)"
Shortcut = ^V
End
End
Begin VB.Menu 查看
Caption = "查看(&V)"
Begin VB.Menu 标准型
Caption = "标准型(&T)"
End
Begin VB.Menu 科学型
Caption = "科学型(&S)"
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim flag As Boolean
Dim m, x As Single
Dim FLAG2, flag3, tag1 As Boolean
Dim js As Boolean
Private Sub Command1_Click(Index As Integer)
tag1 = True
If LTrim(Text1.Text) <> "0." And flag3 = True Then
Select Case Index
Case 0 To 9
If Right(Text1.Text, 1) <> "." Or flag = False Then
Text1.Text = Space(37 - Len(LTrim(Text1.Text))) & LTrim(Text1.Text) & Command1(Index).Caption
Else
Text1.Text = Space(37 - Len(LTrim(Text1.Text))) & Left(Trim(Text1.Text), Len(LTrim(Text1.Text)) - 1) & Command1(Index).Caption & "."
End If
flag = True
Case 11
flag = False
Case 10
If Left(Trim(Text1.Text), 1) <> "-" Then
Text1.Text = Space(37 - Len(LTrim(Text1.Text))) & "-" & LTrim(Text1.Text)
Else
Text1.Text = Space(39 - Len(Trim(Text1.Text))) & Right(Text1.Text, Len(Trim(Text1.Text)) - 1)
End If
End Select
Else
If Index = 11 Then
flag = False
ElseIf Index = 10 Then
flag = True
If Trim(Text1.Text) = "0." Then
Text1.Text = Text1.Text
ElseIf Left(Trim(Text1.Text), 1) <> "-" Then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -