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

📄 form1.frm

📁 一个不仅可以进行常规运行(常规运算能一下计算一个多项式如:1.2*2-3*(3.5+6.7)...)还可以计算矩阵运算的计算机器
💻 FRM
📖 第 1 页 / 共 3 页
字号:
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   600
      TabIndex        =   17
      Top             =   2640
      Width           =   495
   End
   Begin VB.CommandButton Command20 
      Caption         =   ")"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   1080
      TabIndex        =   16
      Top             =   2640
      Width           =   495
   End
   Begin VB.CommandButton Command21 
      Caption         =   "/"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   1560
      TabIndex        =   15
      Top             =   2160
      Width           =   495
   End
   Begin VB.CommandButton Command22 
      Caption         =   "*"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   1560
      TabIndex        =   14
      Top             =   2640
      Width           =   495
   End
   Begin VB.CommandButton Command6 
      Caption         =   "="
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   975
      Left            =   2040
      TabIndex        =   13
      Top             =   1680
      Width           =   495
   End
   Begin VB.CommandButton Command5 
      Caption         =   "."
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   2040
      TabIndex        =   12
      Top             =   2640
      Width           =   495
   End
   Begin VB.CommandButton Command12 
      Caption         =   "sqr"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   2520
      TabIndex        =   11
      Top             =   1680
      Width           =   495
   End
   Begin VB.CommandButton Command13 
      Caption         =   "x^2"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   2520
      TabIndex        =   10
      Top             =   2160
      Width           =   495
   End
   Begin VB.CommandButton Command24 
      Caption         =   "e^x"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3000
      TabIndex        =   9
      Top             =   1680
      Width           =   495
   End
   Begin VB.CommandButton Command25 
      Caption         =   "sin"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3000
      TabIndex        =   8
      Top             =   2160
      Width           =   495
   End
   Begin VB.CommandButton Command26 
      Caption         =   "cos"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3000
      TabIndex        =   7
      Top             =   2640
      Width           =   495
   End
   Begin VB.CommandButton Command27 
      Caption         =   "tan"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3480
      TabIndex        =   6
      Top             =   2160
      Width           =   495
   End
   Begin VB.CommandButton Command28 
      Caption         =   "x/1"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   2520
      TabIndex        =   5
      Top             =   2640
      Width           =   495
   End
   Begin VB.CommandButton Command29 
      Caption         =   "pi"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3960
      TabIndex        =   4
      Top             =   2640
      Width           =   495
   End
   Begin VB.CommandButton Command30 
      Caption         =   "In"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3480
      TabIndex        =   3
      Top             =   1680
      Width           =   495
   End
   Begin VB.CommandButton Command31 
      Caption         =   "清屏"
      Height          =   495
      Left            =   3000
      TabIndex        =   2
      Top             =   1200
      Width           =   975
   End
   Begin VB.CommandButton Command32 
      Caption         =   "n!"
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3960
      TabIndex        =   1
      Top             =   1200
      Width           =   495
   End
   Begin VB.CommandButton Command33 
      Caption         =   "累加"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   975
      Left            =   3960
      TabIndex        =   0
      Top             =   1680
      Width           =   495
   End
   Begin VB.Menu edit 
      Caption         =   "编辑&E"
      Begin VB.Menu copy 
         Caption         =   "复制&C"
      End
      Begin VB.Menu paste 
         Caption         =   "粘贴&P"
      End
      Begin VB.Menu sienceCal 
         Caption         =   "科学计算器"
      End
      Begin VB.Menu exit 
         Caption         =   "退出&E"
      End
   End
   Begin VB.Menu help 
      Caption         =   "帮助&H"
      Begin VB.Menu aboutAuthoury 
         Caption         =   "关于作者&A"
      End
      Begin VB.Menu aboutMachinery 
         Caption         =   "关于计算器&M"
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim str As String
Dim copyStr As String
Dim sqeuestr(50) As String
Dim lastsqeue As Integer
Function Judge1() As Boolean        '判断表达式的括号是否配对
Dim stackstr(50) As String          '利用栈stackstr(20)来实现
Dim top As Integer
Dim str2 As String
Dim text1_text As String
Dim text_length As Integer
top = -1
text1_text = Text1.Text
text_length = Len(text1_text)
Do While (text_length > 0)
    str2 = Left(text1_text, 1)
    text_length = text_length - 1
    text1_text = Right(text1_text, text_length)
    If (str2 = "(") Then
        top = top + 1
        stackstr(top) = str2
    ElseIf str2 = ")" Then
                If top = -1 Then
                    Judge1 = False
                Else
                    top = top - 1
                End If
    End If
    If top = -1 Then
        Judge1 = True
    Else
        Judge1 = False
    End If
Loop
End Function
Function Precedence(str1 As String) As Integer
Select Case str1
    Case "+"
        Precedence = 1
    Case "-"
        Precedence = 1
    Case "/"
        Precedence = 2
    Case "*"

⌨️ 快捷键说明

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