📄 frmcalcsolver.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmCalcSolver
Caption = "Calculation Solver"
ClientHeight = 3372
ClientLeft = 1320
ClientTop = 1680
ClientWidth = 6732
Icon = "frmCalcSolver.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
ScaleHeight = 3372
ScaleWidth = 6732
WindowState = 2 'Maximized
Begin VB.Frame fraLogBase
Caption = "Log Base"
Height = 855
Left = 1440
TabIndex = 16
Top = 2400
Width = 975
Begin VB.TextBox txtLogBase
Alignment = 2 'Center
Height = 285
Left = 120
TabIndex = 17
Text = "10"
Top = 360
Width = 735
End
End
Begin VB.Frame fraEntry
Caption = "Entry:"
Height = 615
Left = 120
TabIndex = 14
Top = 120
Width = 6495
Begin VB.TextBox txtEntry
Height = 285
Left = 120
TabIndex = 1
Top = 240
Width = 6255
End
End
Begin VB.Frame fraAnswer
Caption = "Answers:"
Height = 1455
Left = 120
TabIndex = 13
Top = 840
Width = 6495
Begin VB.TextBox txtAnswer
Height = 1125
Left = 120
Locked = -1 'True
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 2
Top = 240
Width = 6255
End
End
Begin VB.Frame fraButtons
Height = 735
Left = 2520
TabIndex = 12
Top = 2460
Width = 2295
Begin VB.CommandButton cmdClear
Caption = "Clear"
Height = 375
Left = 1200
TabIndex = 8
Top = 240
Width = 972
End
Begin VB.CommandButton cmdCalculate
Caption = "Calculate"
Enabled = 0 'False
Height = 375
Left = 120
TabIndex = 7
Top = 240
Width = 972
End
End
Begin VB.Frame fraAngMode
Caption = "Angle Mode"
Height = 855
Left = 120
TabIndex = 11
Top = 2400
Width = 1215
Begin VB.OptionButton optAngMode
Caption = "Radians"
Height = 255
Index = 1
Left = 120
TabIndex = 10
Top = 490
Width = 900
End
Begin VB.OptionButton optAngMode
Caption = "Degrees"
Height = 255
Index = 0
Left = 120
TabIndex = 9
Top = 240
Value = -1 'True
Width = 900
End
End
Begin VB.Frame fraAnsType
Caption = "Base Mode"
Height = 855
Left = 4920
TabIndex = 0
Top = 2400
Width = 1695
Begin VB.OptionButton optBaseMode
Caption = "Hex"
Height = 255
Index = 2
Left = 960
TabIndex = 5
Top = 240
Width = 660
End
Begin VB.OptionButton optBaseMode
Caption = "Oct"
Height = 255
Index = 3
Left = 960
TabIndex = 6
Top = 490
Width = 660
End
Begin VB.OptionButton optBaseMode
Caption = "Bin"
Height = 255
Index = 1
Left = 120
TabIndex = 4
Top = 490
Width = 660
End
Begin VB.OptionButton optBaseMode
Caption = "Dec"
Height = 255
Index = 0
Left = 120
TabIndex = 3
Top = 240
Value = -1 'True
Width = 660
End
End
Begin MSComctlLib.Toolbar tlbLine
Align = 1 'Align Top
Height = 612
Left = 0
TabIndex = 15
Top = 0
Width = 6732
_ExtentX = 11875
_ExtentY = 1080
ButtonWidth = 614
ButtonHeight = 953
Appearance = 1
_Version = 393216
End
Begin VB.Menu mnuFile
Caption = "&File"
Begin VB.Menu mnuFileCalculate
Caption = "&Calculate"
Shortcut = {F5}
End
Begin VB.Menu mnuFileClear
Caption = "C&lear"
Shortcut = {F7}
End
Begin VB.Menu separator
Caption = "-"
Index = 0
End
Begin VB.Menu mnuFileExit
Caption = "E&xit"
Shortcut = ^Q
End
End
Begin VB.Menu mnuEdit
Caption = "&Edit"
Begin VB.Menu mnuEditCopy
Caption = "&Copy"
Shortcut = ^C
End
Begin VB.Menu mnuEditCut
Caption = "Cu&t"
Shortcut = ^X
End
Begin VB.Menu mnuEditPaste
Caption = "&Paste"
Shortcut = ^V
End
Begin VB.Menu separator2
Caption = "-"
Index = 0
End
Begin VB.Menu mnuEditInsert
Caption = "&Insert"
Begin VB.Menu mnuEditInsertLastAns
Caption = "Last Answer"
Shortcut = {F2}
End
Begin VB.Menu mnuEditInsertLastEntry
Caption = "Last Entry"
Shortcut = {F3}
End
End
Begin VB.Menu separator3
Caption = "-"
End
Begin VB.Menu mnuEditAngle
Caption = "&Angle Mode"
Begin VB.Menu mnuEditAngleMode
Caption = "Degrees"
Checked = -1 'True
Index = 0
End
Begin VB.Menu mnuEditAngleMode
Caption = "Radians"
Index = 1
End
End
Begin VB.Menu mnuEditBase
Caption = "&Base Mode"
Begin VB.Menu mnuEditBaseMode
Caption = "Decimal"
Checked = -1 'True
Index = 0
End
Begin VB.Menu mnuEditBaseMode
Caption = "Binary"
Index = 1
End
Begin VB.Menu mnuEditBaseMode
Caption = "Hexadecimal"
Index = 2
End
Begin VB.Menu mnuEditBaseMode
Caption = "Octal"
Index = 3
End
End
Begin VB.Menu separator4
Caption = "-"
End
Begin VB.Menu mnuEditSettings
Caption = "&Settings"
Begin VB.Menu mnuEditSettingsDefault
Caption = "&Default"
End
Begin VB.Menu mnuEditSettingsRemove
Caption = "&Remove"
End
End
End
Begin VB.Menu mnuHelp
Caption = "&Help"
Begin VB.Menu mnuHelpHelp
Caption = "&Help"
End
Begin VB.Menu separator5
Caption = "-"
End
Begin VB.Menu mnuHelpAbout
Caption = "&About"
End
End
End
Attribute VB_Name = "frmCalcSolver"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim CurrentFocus As String
Dim RegEdit As Boolean
Dim StringLocation As Long
Private Sub cmdCalculate_Click()
'Load main calculation routine
CalculateEntry
End Sub
Private Sub cmdClear_Click()
'If the entry box is empty, clear the answer box;
'if the entry box is not empty, clear it.
Select Case txtEntry.Text
Case ""
txtAnswer.Text = ""
Case Else
txtEntry.Text = ""
End Select
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
'Enter key calls the clicking of the Calculate
'button
If KeyCode = vbKeyReturn And cmdCalculate.Enabled Then
cmdCalculate_Click
End If
End Sub
Private Sub Form_Load()
'Load the form's previous settings
LoadFormSettings
RegEdit = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -