www.pudn.com > functioncalc.rar > Calculator.frm, change:2001-05-14,size:65395b


VERSION 5.00 
Begin VB.Form Calculator  
   BorderStyle     =   3  'Fixed Dialog 
   Caption         =   "计算器" 
   ClientHeight    =   5850 
   ClientLeft      =   2310 
   ClientTop       =   2865 
   ClientWidth     =   4965 
   Icon            =   "Calculator.frx":0000 
   LinkTopic       =   "Form1" 
   LockControls    =   -1  'True 
   MaxButton       =   0   'False 
   MinButton       =   0   'False 
   ScaleHeight     =   5850 
   ScaleWidth      =   4965 
   ShowInTaskbar   =   0   'False 
   Begin VB.OptionButton Option2  
      Caption         =   "角度" 
      Height          =   180 
      Left            =   4200 
      TabIndex        =   38 
      Top             =   360 
      Width           =   855 
   End 
   Begin VB.OptionButton Option1  
      Caption         =   "弧度" 
      Height          =   180 
      Left            =   4200 
      TabIndex        =   37 
      Top             =   120 
      Value           =   -1  'True 
      Width           =   855 
   End 
   Begin VB.TextBox Text1  
      Alignment       =   1  'Right Justify 
      BeginProperty Font  
         Name            =   "宋体" 
         Size            =   12 
         Charset         =   134 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      Height          =   375 
      Left            =   0 
      Locked          =   -1  'True 
      TabIndex        =   36 
      Top             =   120 
      Width           =   4095 
   End 
   Begin VB.Frame Frame5  
      Caption         =   "统计" 
      Height          =   690 
      Left            =   0 
      TabIndex        =   35 
      Top             =   530 
      Width           =   4935 
      Begin VB.CommandButton Command38  
         Caption         =   "Data" 
         Height          =   375 
         Left            =   4200 
         TabIndex        =   46 
         ToolTipText     =   "记录数据" 
         Top             =   240 
         Width           =   675 
      End 
      Begin VB.CommandButton Command37  
         Height          =   375 
         Left            =   3515 
         Picture         =   "Calculator.frx":030A 
         Style           =   1  'Graphical 
         TabIndex        =   45 
         ToolTipText     =   "第二样本均方差" 
         Top             =   240 
         Width           =   675 
      End 
      Begin VB.CommandButton Command36  
         Height          =   375 
         Left            =   2825 
         Picture         =   "Calculator.frx":0FFC 
         Style           =   1  'Graphical 
         TabIndex        =   44 
         ToolTipText     =   "样本均方差" 
         Top             =   240 
         Width           =   675 
      End 
      Begin VB.CommandButton Command35  
         Height          =   375 
         Left            =   2135 
         Picture         =   "Calculator.frx":1AAA 
         Style           =   1  'Graphical 
         TabIndex        =   43 
         ToolTipText     =   "数据平方和" 
         Top             =   240 
         Width           =   675 
      End 
      Begin VB.CommandButton Command34  
         Height          =   375 
         Left            =   1445 
         Picture         =   "Calculator.frx":2708 
         Style           =   1  'Graphical 
         TabIndex        =   42 
         ToolTipText     =   "平均数" 
         Top             =   240 
         Width           =   675 
      End 
      Begin VB.CommandButton Command33  
         Height          =   375 
         Left            =   755 
         Picture         =   "Calculator.frx":31B6 
         Style           =   1  'Graphical 
         TabIndex        =   41 
         ToolTipText     =   "数据总和" 
         Top             =   240 
         Width           =   675 
      End 
      Begin VB.CommandButton Command32  
         Caption         =   "N" 
         Height          =   375 
         Left            =   65 
         TabIndex        =   40 
         ToolTipText     =   "数据总数" 
         Top             =   240 
         Width           =   675 
      End 
   End 
   Begin VB.Frame Frame4  
      Caption         =   "函数" 
      Height          =   1920 
      Left            =   0 
      TabIndex        =   9 
      Top             =   1220 
      Width           =   4935 
      Begin VB.CommandButton Command41  
         Height          =   390 
         Left            =   4200 
         Picture         =   "Calculator.frx":3C64 
         Style           =   1  'Graphical 
         TabIndex        =   62 
         ToolTipText     =   "PI的近似值" 
         Top             =   1050 
         Width           =   695 
      End 
      Begin VB.CommandButton Command40  
         Caption         =   "ArcCos" 
         Height          =   390 
         Index           =   1 
         Left            =   755 
         TabIndex        =   61 
         ToolTipText     =   "反余弦函数" 
         Top             =   180 
         Width           =   695 
      End 
      Begin VB.CommandButton Command40  
         Caption         =   "ArcCth" 
         Height          =   390 
         Index           =   15 
         Left            =   2132 
         TabIndex        =   60 
         ToolTipText     =   "反双曲余切函数" 
         Top             =   1050 
         Width           =   695 
      End 
      Begin VB.CommandButton Command40  
         Caption         =   "Cth" 
         Height          =   390 
         Index           =   14 
         Left            =   2132 
         TabIndex        =   59 
         ToolTipText     =   "双曲余切函数" 
         Top             =   1450 
         Width           =   695 
      End 
      Begin VB.CommandButton Command40  
         Caption         =   "ArcTh" 
         Height          =   390 
         Index           =   13 
         Left            =   1443 
         TabIndex        =   58 
         ToolTipText     =   "反双曲正切函数" 
         Top             =   1050 
         Width           =   695 
      End 
      Begin VB.CommandButton Command40  
         Caption         =   "Th" 
         Height          =   390 
         Index           =   12 
         Left            =   1443 
         TabIndex        =   57 
         ToolTipText     =   "双曲正切函数" 
         Top             =   1450 
         Width           =   695 
      End 
      Begin VB.CommandButton Command40  
         Height          =   390 
         Index           =   11 
         Left            =   3512 
         Picture         =   "Calculator.frx":4582 
         Style           =   1  'Graphical 
         TabIndex        =   56 
         ToolTipText     =   "x开y次方" 
         Top             =   1450 
         Width           =   695 
      End 
      Begin VB.CommandButton Command40  
         Height          =   390 
         Index           =   9 
         Left            =   3512 
         Picture         =   "Calculator.frx":4EA0 
         Style           =   1  'Graphical 
         TabIndex        =   55 
         ToolTipText     =   "真数为x,自变量为y的对数" 
         Top             =   1050 
         Width           =   695 
      End 
      Begin VB.CommandButton Command40  
         Height          =   390 
         Index           =   8 
         Left            =   2822 
         Picture         =   "Calculator.frx":57BE 
         Style           =   1  'Graphical 
         TabIndex        =   54 
         ToolTipText     =   "x开3次方" 
         Top             =   570 
         Width           =   695 
      End 
      Begin VB.CommandButton Command40  
         Caption         =   "ArcCh" 
         Height          =   390 
         Index           =   7 
         Left            =   754 
         TabIndex        =   53 
         ToolTipText     =   "反双曲余弦函数" 
         Top             =   1050 
         Width           =   695 
      End 
      Begin VB.CommandButton Command40  
         Caption         =   "Ch" 
         Height          =   390 
         Index           =   6 
         Left            =   754 
         TabIndex        =   52 
         ToolTipText     =   "双曲余弦函数" 
         Top             =   1450 
         Width           =   695 
      End 
      Begin VB.CommandButton Command40  
         Caption         =   "ArcSh" 
         Height          =   390 
         Index           =   5 
         Left            =   65 
         TabIndex        =   51 
         ToolTipText     =   "反双曲正弦函数" 
         Top             =   1050 
         Width           =   695 
      End 
      Begin VB.CommandButton Command40  
         Caption         =   "Sh" 
         Height          =   390 
         Index           =   4 
         Left            =   65 
         TabIndex        =   50 
         ToolTipText     =   "双曲正弦函数" 
         Top             =   1450 
         Width           =   695 
      End 
      Begin VB.CommandButton Command40  
         Caption         =   "ArcCot" 
         Height          =   390 
         Index           =   3 
         Left            =   2135 
         TabIndex        =   49 
         ToolTipText     =   "反余切函数" 
         Top             =   180 
         Width           =   695 
      End 
      Begin VB.CommandButton Command40  
         Caption         =   "Cot" 
         Height          =   390 
         Index           =   2 
         Left            =   2132 
         TabIndex        =   48 
         ToolTipText     =   "余切函数" 
         Top             =   570 
         Width           =   695 
      End 
      Begin VB.CommandButton Command40  
         Caption         =   "ArcSin" 
         Height          =   390 
         Index           =   0 
         Left            =   65 
         TabIndex        =   47 
         ToolTipText     =   "反正弦函数" 
         Top             =   180 
         Width           =   695 
      End 
      Begin VB.CommandButton Command31  
         Caption         =   "n!" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   390 
         Left            =   4200 
         TabIndex        =   34 
         ToolTipText     =   "阶乘" 
         Top             =   1450 
         Width           =   695 
      End 
      Begin VB.CommandButton Command29  
         Caption         =   "Log10" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   390 
         Left            =   2822 
         TabIndex        =   20 
         ToolTipText     =   "常用对数(10为底)" 
         Top             =   1450 
         Width           =   695 
      End 
      Begin VB.CommandButton Command28  
         Caption         =   "Ln" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   390 
         Left            =   4200 
         TabIndex        =   19 
         ToolTipText     =   "自然对数" 
         Top             =   180 
         Width           =   695 
      End 
      Begin VB.CommandButton Command27  
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   390 
         Left            =   4200 
         Picture         =   "Calculator.frx":60DC 
         Style           =   1  'Graphical 
         TabIndex        =   18 
         ToolTipText     =   "e为底的指数函数" 
         Top             =   570 
         Width           =   695 
      End 
      Begin VB.CommandButton Command26  
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   390 
         Left            =   2822 
         Picture         =   "Calculator.frx":6C72 
         Style           =   1  'Graphical 
         TabIndex        =   17 
         ToolTipText     =   "10的x次方" 
         Top             =   1050 
         Width           =   695 
      End 
      Begin VB.CommandButton Command25  
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   390 
         Left            =   3512 
         Picture         =   "Calculator.frx":7590 
         Style           =   1  'Graphical 
         TabIndex        =   16 
         ToolTipText     =   "平方" 
         Top             =   570 
         Width           =   695 
      End 
      Begin VB.CommandButton Command24  
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   390 
         Left            =   3515 
         Picture         =   "Calculator.frx":80B2 
         Style           =   1  'Graphical 
         TabIndex        =   15 
         ToolTipText     =   "开二次方" 
         Top             =   180 
         Width           =   695 
      End 
      Begin VB.CommandButton Command23  
         Caption         =   "1/x" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   390 
         Left            =   2825 
         TabIndex        =   14 
         ToolTipText     =   "倒数" 
         Top             =   180 
         Width           =   695 
      End 
      Begin VB.CommandButton Command22  
         Caption         =   "Atn" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   390 
         Left            =   1445 
         TabIndex        =   13 
         ToolTipText     =   "反正切函数" 
         Top             =   180 
         Width           =   695 
      End 
      Begin VB.CommandButton Command21  
         Caption         =   "Tan" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   390 
         Left            =   1443 
         TabIndex        =   12 
         ToolTipText     =   "正切函数" 
         Top             =   570 
         Width           =   695 
      End 
      Begin VB.CommandButton Command20  
         Caption         =   "Cos" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   390 
         Left            =   754 
         TabIndex        =   11 
         ToolTipText     =   "余弦函数" 
         Top             =   570 
         Width           =   695 
      End 
      Begin VB.CommandButton Command19  
         Caption         =   "Sin" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   390 
         Left            =   65 
         TabIndex        =   10 
         ToolTipText     =   "正弦函数" 
         Top             =   570 
         Width           =   695 
      End 
   End 
   Begin VB.Frame Frame3  
      Height          =   2655 
      Left            =   3840 
      TabIndex        =   6 
      Top             =   3120 
      Width           =   1095 
      Begin VB.CommandButton Command39  
         Caption         =   "撤消" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   495 
         Left            =   120 
         TabIndex        =   39 
         ToolTipText     =   "撤消上一次操作" 
         Top             =   840 
         Width           =   855 
      End 
      Begin VB.CommandButton Command30  
         Caption         =   "清除" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   495 
         Left            =   120 
         TabIndex        =   21 
         ToolTipText     =   "清除所有输入和计算结果" 
         Top             =   1440 
         Width           =   855 
      End 
      Begin VB.CommandButton Command18  
         Caption         =   "退出" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   495 
         Left            =   120 
         TabIndex        =   8 
         ToolTipText     =   "退出计算器" 
         Top             =   2040 
         Width           =   855 
      End 
      Begin VB.CommandButton Command17  
         Caption         =   "=" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   495 
         Left            =   120 
         TabIndex        =   7 
         ToolTipText     =   "等号" 
         Top             =   240 
         Width           =   855 
      End 
   End 
   Begin VB.Frame Frame2  
      Height          =   2655 
      Left            =   2520 
      TabIndex        =   1 
      Top             =   3120 
      Width           =   1095 
      Begin VB.CommandButton Command16  
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   495 
         Left            =   120 
         Picture         =   "Calculator.frx":8BD4 
         Style           =   1  'Graphical 
         TabIndex        =   5 
         ToolTipText     =   "除号" 
         Top             =   240 
         Width           =   855 
      End 
      Begin VB.CommandButton Command15  
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   495 
         Left            =   120 
         Picture         =   "Calculator.frx":96F6 
         Style           =   1  'Graphical 
         TabIndex        =   4 
         ToolTipText     =   "乘号" 
         Top             =   840 
         Width           =   855 
      End 
      Begin VB.CommandButton Command14  
         Caption         =   "-" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   495 
         Left            =   120 
         TabIndex        =   3 
         ToolTipText     =   "减号" 
         Top             =   1440 
         Width           =   855 
      End 
      Begin VB.CommandButton Command13  
         Caption         =   "+" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   495 
         Left            =   120 
         TabIndex        =   2 
         ToolTipText     =   "加号" 
         Top             =   2040 
         Width           =   855 
      End 
   End 
   Begin VB.Frame Frame1  
      ForeColor       =   &H000000FF& 
      Height          =   2655 
      Left            =   0 
      TabIndex        =   0 
      Top             =   3120 
      Width           =   2295 
      Begin VB.CommandButton Command12  
         Caption         =   "-" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   495 
         Left            =   900 
         TabIndex        =   33 
         ToolTipText     =   "负号" 
         Top             =   2040 
         Width           =   495 
      End 
      Begin VB.CommandButton Command11  
         Caption         =   "." 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   495 
         Left            =   1680 
         TabIndex        =   32 
         ToolTipText     =   "小数点" 
         Top             =   2040 
         Width           =   495 
      End 
      Begin VB.CommandButton Command10  
         Caption         =   "0" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   495 
         Left            =   120 
         TabIndex        =   31 
         Top             =   2040 
         Width           =   495 
      End 
      Begin VB.CommandButton Command9  
         Caption         =   "9" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   495 
         Left            =   1680 
         TabIndex        =   30 
         Top             =   240 
         Width           =   495 
      End 
      Begin VB.CommandButton Command8  
         Caption         =   "8" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   495 
         Left            =   900 
         Style           =   1  'Graphical 
         TabIndex        =   29 
         Top             =   240 
         Width           =   495 
      End 
      Begin VB.CommandButton Command7  
         Caption         =   "7" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   495 
         Left            =   120 
         TabIndex        =   28 
         Top             =   240 
         Width           =   495 
      End 
      Begin VB.CommandButton Command6  
         Caption         =   "6" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   495 
         Left            =   1680 
         TabIndex        =   27 
         Top             =   840 
         Width           =   495 
      End 
      Begin VB.CommandButton Command5  
         Caption         =   "5" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   495 
         Left            =   900 
         TabIndex        =   26 
         Top             =   840 
         Width           =   495 
      End 
      Begin VB.CommandButton Command4  
         Caption         =   "4" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   495 
         Left            =   120 
         TabIndex        =   25 
         Top             =   840 
         Width           =   495 
      End 
      Begin VB.CommandButton Command3  
         Caption         =   "3" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   495 
         Left            =   1680 
         TabIndex        =   24 
         Top             =   1440 
         Width           =   495 
      End 
      Begin VB.CommandButton Command2  
         Caption         =   "2" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   495 
         Left            =   900 
         TabIndex        =   23 
         Top             =   1440 
         Width           =   495 
      End 
      Begin VB.CommandButton Command1  
         Caption         =   "1" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   495 
         Left            =   120 
         TabIndex        =   22 
         Top             =   1440 
         Width           =   495 
      End 
   End 
   Begin VB.Menu mnuedit  
      Caption         =   "编辑(&E)" 
      Begin VB.Menu mnueditcopy  
         Caption         =   "复制(&C)" 
         Shortcut        =   ^C 
      End 
      Begin VB.Menu mnueditbar  
         Caption         =   "-" 
      End 
      Begin VB.Menu mnueditselall  
         Caption         =   "全选(&A)" 
         Shortcut        =   ^A 
      End 
   End 
   Begin VB.Menu menu1  
      Caption         =   "查看(&V)" 
      Begin VB.Menu menu1_1  
         Caption         =   "标准型(&T)" 
      End 
      Begin VB.Menu menu1_2  
         Caption         =   "科学型(&S)" 
      End 
   End 
   Begin VB.Menu menu2  
      Caption         =   "帮助(&H)" 
      Begin VB.Menu menu2_2  
         Caption         =   "帮助(&H)" 
      End 
      Begin VB.Menu menu2_1  
         Caption         =   "关于计算器(&A)" 
      End 
      Begin VB.Menu menu2_4  
         Caption         =   "-" 
      End 
      Begin VB.Menu menu2_3  
         Caption         =   "退出(&E)" 
      End 
   End 
End 
Attribute VB_Name = "Calculator" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Option Base 1 
Const PI As Double = 3.14159265358979 
Private Datas(500) As Double 
Private Star1, Star2, Star3, Star4, Star5, Star6 As Integer 
Public Flag As Integer 
Public Firstnum As String, Secondnum As String, Flags As String 
Public x As String, y As String 
Public Flag1 As Integer, Flag2 As Integer, Flag3 As Integer, Flag4 As Integer, _ 
n, Flag5, Flag6 As Integer 
 
 
Public Function Fruit(x, y) 
 If Flag1 = 1 Then 
  Fruit = Trim(Str(Val(x) + Val(y))) 
 ElseIf Flag2 = 1 Then 
  Fruit = Trim(Str(Val(x) - Val(y))) 
 ElseIf Flag3 = 1 Then 
  Fruit = Trim(Str(Val(x) * Val(y))) 
 ElseIf Flag4 = 1 Then 
  If Val(y) = 0 Then 
    Nn = MsgBox("除数不能为零!", vbOKOnly + vbExclamation, "数据错误警告") 
    Text1.Text = "" 
    Firstnum = "" 
    Secondnum = "" 
  Else 
    Fruit = Trim(Str(Val(x) / Val(y))) 
   End If 
ElseIf Flag5 = 1 Then 
   If Val(y) = 0 Then 
    Nn = MsgBox("不能开零次方!", vbOKOnly + vbExclamation, "数据错误警告") 
    Text1.Text = "" 
    Firstnum = "" 
    Secondnum = "" 
    Exit Function 
  ElseIf Val(x) < 0 And Val(x) / 2 = Int(Val(x) / 2) Then 
  Nn = MsgBox("负数不能开偶次方!", vbOKOnly + vbExclamation, "数据错误警告") 
    Text1.Text = "" 
    Firstnum = "" 
    Secondnum = "" 
    Exit Function 
  Else 
   Fruit = Trim(Str(Val(x) ^ (1 / Val(y)))) 
  End If 
ElseIf Flag6 = 1 Then 
If Val(x) <= 0 Or Val(x) = 1 Or Val(y) <= 0 Then 
Nn = MsgBox("数据不符合对数的定义!", vbOKOnly + vbExclamation, "数据错误警告") 
    Text1.Text = "" 
    Firstnum = "" 
    Secondnum = "" 
    Exit Function 
Else 
Fruit = Trim(Str(Log(Val(y)) / Log(Val(x)))) 
 End If 
 End If 
End Function 
 
Private Sub Command1_Click() 
 If Flag1 = 0 And Flag2 = 0 And Flag3 = 0 And Flag4 = 0 And Flag5 = 0 And Flag6 = 0 Then 
    Firstnum = Firstnum & "1" 
    Text1.Text = Trim(Firstnum) 
 Else 
  If Flag5 = 1 Or Flag6 = 1 Then 
  Text1.Text = "" 
  Secondnum = Secondnum & "1" 
  Text1.Text = Trim(Flags & Secondnum) 
  Else 
  Secondnum = Secondnum & "1" 
  Text1.Text = Trim(Flags & Secondnum) 
  End If 
 End If 
 Text1.SetFocus 
End Sub 
 
 
Private Sub Command10_Click() 
 If Flag1 = 0 And Flag2 = 0 And Flag3 = 0 And Flag4 = 0 And Flag5 = 0 And Flag6 = 0 Then 
    Firstnum = Firstnum & "0" 
  Text1.Text = Trim(Firstnum) 
 Else 
  If Flag5 = 1 Or Flag6 = 1 Then 
  Text1.Text = "" 
  Secondnum = Secondnum & "0" 
  Text1.Text = Trim(Flags & Secondnum) 
  Else 
  Secondnum = Secondnum & "0" 
  Text1.Text = Trim(Flags & Secondnum) 
  End If 
 End If 
End Sub 
 
Private Sub Command11_Click() 
 If Flag1 = 0 And Flag2 = 0 And Flag3 = 0 And Flag4 = 0 And Flag5 = 0 And Flag6 = 0 Then 
     Firstnum = Firstnum & "." 
   Text1.Text = Trim(Firstnum) 
 Else 
   If Flag5 = 1 Or Flag6 = 1 Then 
  Text1.Text = "" 
  Secondnum = Secondnum & "." 
  Text1.Text = Trim(Flags & Secondnum) 
  Else 
  Secondnum = Secondnum & "." 
  Text1.Text = Trim(Flags & Secondnum) 
  End If 
 End If 
 Text1.SetFocus 
End Sub 
 
Private Sub Command12_Click() 
 If Flag1 = 0 And Flag2 = 0 And Flag3 = 0 And Flag4 = 0 And Flag5 = 0 And Flag6 = 0 Then 
    Firstnum = "-" & Firstnum 
  Text1.Text = Trim(Firstnum) 
 Else 
 If Flag5 = 1 Or Flag6 = 1 Then 
  Text1.Text = "" 
  Secondnum = "-" & Secondnum 
  Text1.Text = Trim(Flags & Secondnum) 
  Else 
    Secondnum = "-" & Secondnum 
  Text1.Text = Trim(Flags & Secondnum) 
 End If 
 End If 
 Text1.SetFocus 
End Sub 
 
Private Sub Command13_Click() 
 If Flag1 = 1 Then 
  Firstnum = Trim(Val(Firstnum) + Val(Secondnum)) 
  Text1.Text = Trim(Firstnum & "+") 
  Flags = Firstnum & "+" 
  Flag1 = 1 
 ElseIf Flag2 = 1 Then 
  Firstnum = Trim(Val(Firstnum) - Val(Secondnum)) 
  Text1.Text = Trim(Firstnum & "+") 
  Flags = Firstnum & "+" 
  Flag2 = 0 
  Flag1 = 1 
 ElseIf Flag3 = 1 Then 
  Firstnum = Trim(Val(Firstnum) * Val(Secondnum)) 
  Text1.Text = Trim(Firstnum & "+") 
  Flags = Firstnum & "+" 
  Flag3 = 0 
  Flag1 = 1 
 ElseIf Flag4 = 1 Then 
  If Val(Secondnum) = 0 Then 
   Nn = MsgBox("除数不能为零!", vbOKOnly + vbExclamation, "数据错误警告") 
   Text1.Text = "" 
   Firstnum = "" 
   Secondnum = "" 
   Exit Sub 
  Else 
   Firstnum = Trim(Val(Firstnum) / Val(Secondnum)) 
   Text1.Text = Trim(Firstnum & "+") 
   Flags = Firstnum & "+" 
   Flag4 = 0 
   Flag1 = 1 
  End If 
 Else 
  Flag1 = 1 
  Text1.Text = Trim(Firstnum & "+") 
  Flags = Firstnum & "+" 
 End If 
 Secondnum = "" 
 Text1.SetFocus 
End Sub 
 
Private Sub Command14_Click() 
 If Flag1 = 1 Then 
  Firstnum = Trim(Val(Firstnum) + Val(Secondnum)) 
  Text1.Text = Trim(Firstnum & "-") 
  Flags = Firstnum & "-" 
  Flag1 = 0 
  Flag2 = 1 
 ElseIf Flag2 = 1 Then 
  Firstnum = Trim(Val(Firstnum) - Val(Secondnum)) 
  Text1.Text = Trim(Firstnum & "-") 
  Flags = Firstnum & "-" 
  Flag2 = 1 
 ElseIf Flag3 = 1 Then 
  Firstnum = Trim(Val(Firstnum) * Val(Secondnum)) 
  Text1.Text = Trim(Firstnum & "-") 
  Flags = Firstnum & "-" 
  Flag3 = 0 
  Flag2 = 1 
 ElseIf Flag4 = 1 Then 
  If Val(Secondnum) = 0 Then 
    Nn = MsgBox("除数不能为零!", vbOKOnly + vbExclamation, "数据错误警告") 
    Text1.Text = "" 
    Firstnum = "" 
    Secondnum = "" 
    Exit Sub 
  Else 
   Firstnum = Trim(Val(Firstnum) / Val(Secondnum)) 
   Text1.Text = Trim(Firstnum & "-") 
   Flags = Firstnum & "-" 
   Flag4 = 0 
   Flag2 = 1 
  End If 
 Else 
  Flag2 = 1 
  Text1.Text = Trim(Firstnum & "-") 
  Flags = Firstnum & "-" 
 End If 
 Secondnum = "" 
 Text1.SetFocus 
End Sub 
 
Private Sub Command15_Click() 
 If Flag1 = 1 Then 
  Firstnum = Trim(Val(Firstnum) + Val(Secondnum)) 
  Text1.Text = Trim(Firstnum & "*") 
  Flags = Firstnum & "*" 
  Flag1 = 0 
  Flag3 = 1 
 ElseIf Flag2 = 1 Then 
  Firstnum = Trim(Val(Firstnum) - Val(Secondnum)) 
  Text1.Text = Trim(Firstnum & "*") 
  Flags = Firstnum & "*" 
  Flag2 = 0 
  Flag3 = 1 
 ElseIf Flag3 = 1 Then 
  Firstnum = Trim(Val(Firstnum) * Val(Secondnum)) 
  Text1.Text = Trim(Firstnum & "*") 
  Flags = Firstnum & "*" 
  Flag3 = 1 
 ElseIf Flag4 = 1 Then 
  If Val(Secondnum) = 0 Then 
    Nn = MsgBox("除数不能为零!", vbOKOnly + vbExclamation, "数据错误警告") 
    Text1.Text = "" 
    Firstnum = "" 
    Secondnum = "" 
    Exit Sub 
  Else 
   Firstnum = Trim(Val(Firstnum) / Val(Secondnum)) 
   Text1.Text = Trim(Firstnum & "*") 
   Flags = Firstnum & "*" 
   Flag4 = 0 
   Flag3 = 1 
  End If 
 Else 
  Flag3 = 1 
  Text1.Text = Trim(Firstnum & "*") 
  Flags = Firstnum & "*" 
 End If 
 Secondnum = "" 
 Text1.SetFocus 
End Sub 
 
Private Sub Command16_Click() 
 If Flag1 = 1 Then 
  Firstnum = Trim(Val(Firstnum) + Val(Secondnum)) 
  Text1.Text = Trim(Firstnum & "/") 
  Flags = Firstnum & "/" 
  Flag1 = 0 
  Flag4 = 1 
 ElseIf Flag2 = 1 Then 
  Firstnum = Trim(Val(Firstnum) - Val(Secondnum)) 
  Text1.Text = Trim(Firstnum & "/") 
  Flags = Firstnum & "/" 
  Flag2 = 0 
  Flag4 = 1 
 ElseIf Flag3 = 1 Then 
  Firstnum = Trim(Val(Firstnum) * Val(Secondnum)) 
  Text1.Text = Trim(Firstnum & "/") 
  Flags = Firstnum & "/" 
  Flag3 = 0 
  Flag4 = 1 
 ElseIf Flag4 = 1 Then 
  If Val(Secondnum) = 0 Then 
    Nn = MsgBox("除数不能为零!", vbOKOnly + vbExclamation, "数据错误警告") 
    Text1.Text = "" 
    Firstnum = "" 
    Secondnum = "" 
    Exit Sub 
   Else 
    Firstnum = Trim(Val(Firstnum) / Val(Secondnum)) 
    Text1.Text = Trim(Firstnum & "/") 
    Flags = Firstnum & "/" 
    Flag4 = 1 
   End If 
 Else 
  Flag4 = 1 
  Text1.Text = Trim(Firstnum & "/") 
  Flags = Firstnum & "/" 
 End If 
 Secondnum = "" 
 Text1.SetFocus 
End Sub 
 
Private Sub Command17_Click() 
 Text1.Text = Fruit(Firstnum, Secondnum) 
 Flag1 = 0 
 Flag2 = 0 
 Flag3 = 0 
 Flag4 = 0 
 Flag5 = 0 
 Flag6 = 0 
 Firstnum = Text1.Text 
 Secondnum = "" 
 Text1.SetFocus 
End Sub 
 
Private Sub Command18_Click() 
 Unload Me 
End Sub 
 
Private Sub Command19_Click() 
 If Text1.Text = "" Then 
  Nn = MsgBox("没有自变量!", vbOKOnly + vbExclamation, "操作错误警告!") 
  Exit Sub 
 Else 
  If Option2.Value = True Then 
   If Flag1 = 1 Or Flag2 = 1 Or Flag3 = 1 Or Flag4 = 1 Then 
    Text1.Text = Trim(Sin((Val(Fruit(Firstnum, Secondnum))) * 3.14159265358979 / 180)) 
   Else 
    Text1.Text = Trim(Sin((Val(Firstnum)) * 3.14159265358979 / 180)) 
   End If 
  Else 
   If Flag1 = 1 Or Flag2 = 1 Or Flag3 = 1 Or Flag4 = 1 Then 
    Text1.Text = Trim(Sin(Val(Fruit(Firstnum, Secondnum)))) 
   Else 
    Text1.Text = Trim(Sin(Val(Firstnum))) 
   End If 
  End If 
 End If 
 Firstnum = Text1.Text 
 Secondnum = "" 
 Flag1 = 0 
 Flag2 = 0 
 Flag3 = 0 
 Flag4 = 0 
 Text1.SetFocus 
End Sub 
 
Private Sub Command2_Click() 
 If Flag1 = 0 And Flag2 = 0 And Flag3 = 0 And Flag4 = 0 And Flag5 = 0 And Flag6 = 0 Then 
    Firstnum = Firstnum & "2" 
  Text1.Text = Trim(Firstnum) 
 Else 
  If Flag5 = 1 Or Flag6 = 1 Then 
  Text1.Text = "" 
  Secondnum = Secondnum & "2" 
  Text1.Text = Trim(Flags & Secondnum) 
  Else 
  Secondnum = Secondnum & "2" 
  Text1.Text = Trim(Flags & Secondnum) 
  End If 
 End If 
 Text1.SetFocus 
End Sub 
 
Private Sub Command20_Click() 
 Dim Nn As Integer 
 If Text1.Text = "" Then 
  Nn = MsgBox("没有自变量!", vbOKOnly + vbExclamation, "操作错误警告!") 
  Exit Sub 
 Else 
  If Option2.Value = True Then 
   If Flag1 = 1 Or Flag2 = 1 Or Flag3 = 1 Or Flag4 = 1 Then 
    Text1.Text = Trim(Cos((Val(Fruit(Firstnum, Secondnum))) * 3.14159265358979 / 180)) 
   Else 
    Text1.Text = Trim(Cos((Val(Firstnum)) * 3.14159265358979 / 180)) 
   End If 
  Else 
   If Flag1 = 1 Or Flag2 = 1 Or Flag3 = 1 Or Flag4 = 1 Then 
    Text1.Text = Trim(Cos(Val(Fruit(Firstnum, Secondnum)))) 
   Else 
    Text1.Text = Trim(Cos(Val(Firstnum))) 
   End If 
  End If 
 End If 
 Firstnum = Text1.Text 
 Secondnum = "" 
 Flag1 = 0 
 Flag2 = 0 
 Flag3 = 0 
 Flag4 = 0 
 Text1.SetFocus 
End Sub 
 
Private Sub Command21_Click() 
 Dim Nn As Integer 
 If Text1.Text = "" Then 
  Nn = MsgBox("没有自变量!", vbOKOnly + vbExclamation, "操作错误警告!") 
  Exit Sub 
 Else 
  If Option2.Value = True Then 
   If Flag1 = 1 Or Flag2 = 1 Or Flag3 = 1 Or Flag4 = 1 Then 
    Text1.Text = Trim(Tan((Val(Fruit(Firstnum, Secondnum))) * 3.14159265358979 / 180)) 
   Else 
    Text1.Text = Trim(Tan((Val(Firstnum)) * 3.14159265358979 / 180)) 
   End If 
  Else 
   If Flag1 = 1 Or Flag2 = 1 Or Flag3 = 1 Or Flag4 = 1 Then 
    Text1.Text = Trim(Tan(Val(Fruit(Firstnum, Secondnum)))) 
   Else 
    Text1.Text = Trim(Tan(Val(Firstnum))) 
   End If 
  End If 
 End If 
 Firstnum = Text1.Text 
 Secondnum = "" 
 Flag1 = 0 
 Flag2 = 0 
 Flag3 = 0 
 Flag4 = 0 
 Text1.SetFocus 
End Sub 
 
Private Sub Command22_Click() 
 If Text1.Text = "" Then 
  Nn = MsgBox("没有自变量!", vbOKOnly + vbExclamation, "操作错误警告!") 
  Exit Sub 
 Else 
     If Flag1 = 1 Or Flag2 = 1 Or Flag3 = 1 Or Flag4 = 1 Then 
    Text1.Text = Trim(Atn(Val(Fruit(Firstnum, Secondnum)))) 
   Else 
    Text1.Text = Trim(Atn(Val(Firstnum))) 
   End If 
  End If 
 Firstnum = Text1.Text 
 Secondnum = "" 
 Flag1 = 0 
 Flag2 = 0 
 Flag3 = 0 
 Flag4 = 0 
 Text1.SetFocus 
End Sub 
 
Private Sub Command23_Click() 
 If Text1.Text = "" Then 
  Nn = MsgBox("没有自变量!", vbOKOnly + vbExclamation, "操作错误警告!") 
  Exit Sub 
 Else 
  If Flag1 = 1 Or Flag2 = 1 Or Flag3 = 1 Or Flag4 = 1 Then 
   If Val(Fruit(Firstnum, Secondnum)) = 0 Then 
     Nn = MsgBox("除数不能为零!", vbOKOnly + vbExclamation, "数据错误警告") 
     Text1.Text = "" 
     Firstnum = "" 
     Secondnum = "" 
     Exit Sub 
   Else 
    Text1.Text = Trim(1 / (Val(Fruit(Firstnum, Secondnum)))) 
   End If 
  Else 
   If Val(Fruit(Firstnum, Secondnum)) = 0 Then 
    Nn = MsgBox("除数不能为零!", vbOKOnly + vbExclamation, "数据错误警告") 
    Text1.Text = "" 
    Firstnum = "" 
    Secondnum = "" 
    Exit Sub 
   Else 
    Text1.Text = Trim(1 / (Val(Firstnum))) 
   End If 
  End If 
 End If 
 Firstnum = Text1.Text 
 Secondnum = "" 
 Flag1 = 0 
 Flag2 = 0 
 Flag3 = 0 
 Flag4 = 0 
 Text1.SetFocus 
End Sub 
 
Private Sub Command24_Click() 
 If Text1.Text = "" Then 
  Nn = MsgBox("没有自变量!", vbOKOnly + vbExclamation, "操作错误警告!") 
  Exit Sub 
 Else 
  If Flag1 = 1 Or Flag2 = 1 Or Flag3 = 1 Or Flag4 = 1 Then 
   If Val(Fruit(Firstnum, Secondnum)) < 0 Then 
    Nn = MsgBox("开平方自变量应大于等于零!", vbOKOnly + vbExclamation, "数据错误警告") 
    Text1.Text = "" 
    Firstnum = "" 
    Secondnum = "" 
    Exit Sub 
   Else 
    Text1.Text = Trim((Val(Fruit(Firstnum, Secondnum))) ^ 0.5) 
   End If 
  Else 
   If Val(Firstnum) < 0 Then 
    Nn = MsgBox("开平方自变量应大于等于零!", vbOKOnly + vbExclamation, "数据错误警告") 
    Text1.Text = "" 
    Firstnum = "" 
    Secondnum = "" 
    Exit Sub 
   Else 
    Text1.Text = Trim((Val(Firstnum)) ^ 0.5) 
   End If 
  End If 
 End If 
 Firstnum = Text1.Text 
 Secondnum = "" 
 Flag1 = 0 
 Flag2 = 0 
 Flag3 = 0 
 Flag4 = 0 
 Text1.SetFocus 
End Sub 
 
Private Sub Command25_Click() 
 If Text1.Text = "" Then 
  Nn = MsgBox("没有自变量!", vbOKOnly + vbExclamation, "操作错误警告!") 
  Exit Sub 
 Else 
  If Flag1 = 1 Or Flag2 = 1 Or Flag3 = 1 Or Flag4 = 1 Then 
   Text1.Text = Trim((Val(Fruit(Firstnum, Secondnum))) ^ 2) 
  Else 
   Text1.Text = Trim((Val(Firstnum)) ^ 2) 
  End If 
 End If 
 Firstnum = Text1.Text 
 Secondnum = "" 
 Flag1 = 0 
 Flag2 = 0 
 Flag3 = 0 
 Flag4 = 0 
 Text1.SetFocus 
End Sub 
 
Private Sub Command26_Click() 
 If Text1.Text = "" Then 
  Nn = MsgBox("没有自变量!", vbOKOnly + vbExclamation, "操作错误警告!") 
  Exit Sub 
 Else 
  If Flag1 = 1 Or Flag2 = 1 Or Flag3 = 1 Or Flag4 = 1 Then 
   Text1.Text = Trim(10 ^ (Val(Fruit(Firstnum, Secondnum)))) 
  Else 
   Text1.Text = Trim(10 ^ (Val(Firstnum))) 
  End If 
 End If 
 Firstnum = Text1.Text 
 Secondnum = "" 
 Flag1 = 0 
 Flag2 = 0 
 Flag3 = 0 
 Flag4 = 0 
 Text1.SetFocus 
End Sub 
 
Private Sub Command27_Click() 
 If Text1.Text = "" Then 
  Nn = MsgBox("没有自变量!", vbOKOnly + vbExclamation, "操作错误警告!") 
  Exit Sub 
 Else 
  If Flag1 = 1 Or Flag2 = 1 Or Flag3 = 1 Or Flag4 = 1 Then 
   Text1.Text = Trim(Exp((Val(Fruit(Firstnum, Secondnum))))) 
  Else 
   Text1.Text = Trim(Exp((Val(Firstnum)))) 
  End If 
 End If 
 Firstnum = Text1.Text 
 Secondnum = "" 
 Flag1 = 0 
 Flag2 = 0 
 Flag3 = 0 
 Flag4 = 0 
 Text1.SetFocus 
End Sub 
 
Private Sub Command28_Click() 
 If Text1.Text = "" Then 
  Nn = MsgBox("没有自变量!", vbOKOnly + vbExclamation, "操作错误警告!") 
  Exit Sub 
 Else 
  If Flag1 = 1 Or Flag2 = 1 Or Flag3 = 1 Or Flag4 = 1 Then 
   If Val(Fruit(Firstnum, Secondnum)) <= 0 Then 
    Nn = MsgBox("对数函数自变量应大于零!", vbOKOnly + vbExclamation, "数据错误警告") 
    Text1.Text = "" 
    Firstnum = "" 
    Secondnum = "" 
    Exit Sub 
   Else 
    Text1.Text = Trim(Log((Val(Fruit(Firstnum, Secondnum))))) 
   End If 
  Else 
   If Val(Firstnum) <= 0 Then 
    Nn = MsgBox("对数函数自变量应大于零!", vbOKOnly + vbExclamation, "数据错误警告") 
    Text1.Text = "" 
    Firstnum = "" 
    Secondnum = "" 
    Exit Sub 
   Else 
    Text1.Text = Trim(Log((Val(Firstnum)))) 
   End If 
  End If 
 End If 
 Firstnum = Text1.Text 
 Secondnum = "" 
 Flag1 = 0 
 Flag2 = 0 
 Flag3 = 0 
 Flag4 = 0 
 Text1.SetFocus 
End Sub 
 
Private Sub Command29_Click() 
 If Text1.Text = "" Then 
  Nn = MsgBox("没有自变量!", vbOKOnly + vbExclamation, "操作错误警告!") 
  Exit Sub 
 Else 
  If Flag1 = 1 Or Flag2 = 1 Or Flag3 = 1 Or Flag4 = 1 Then 
   If Val(Fruit(Firstnum, Secondnum)) <= 0 Then 
    Nn = MsgBox("对数函数自变量应大于零!", vbOKOnly + vbExclamation, "数据错误警告") 
    Text1.Text = "" 
    Firstnum = "" 
    Secondnum = "" 
    Exit Sub 
   Else 
    Text1.Text = Trim(Log((Val(Fruit(Firstnum, Secondnum)))) / Log(10)) 
   End If 
  Else 
   If Val(Firstnum) <= 0 Then 
    Nn = MsgBox("对数函数自变量应大于零!", vbOKOnly + vbExclamation, "数据错误警告") 
    Text1.Text = "" 
    Firstnum = "" 
    Secondnum = "" 
    Exit Sub 
   Else 
    Text1.Text = Trim(Log((Val(Firstnum))) / Log(10)) 
  End If 
 End If 
 End If 
 Firstnum = Text1.Text 
 Secondnum = "" 
 Flag1 = 0 
 Flag2 = 0 
 Flag3 = 0 
 Flag4 = 0 
 Text1.SetFocus 
End Sub 
 
Private Sub Command3_Click() 
 If Flag1 = 0 And Flag2 = 0 And Flag3 = 0 And Flag4 = 0 And Flag5 = 0 And Flag6 = 0 Then 
   Firstnum = Firstnum & "3" 
  Text1.Text = Trim(Firstnum) 
 Else 
  If Flag5 = 1 Or Flag6 = 1 Then 
  Text1.Text = "" 
  Secondnum = Secondnum & "3" 
  Text1.Text = Trim(Flags & Secondnum) 
  Else 
  Secondnum = Secondnum & "3" 
  Text1.Text = Trim(Flags & Secondnum) 
  End If 
 End If 
 Text1.SetFocus 
End Sub 
 
Private Sub Command30_Click() 
 Flag1 = 0 
 Flag2 = 0 
 Flag3 = 0 
 Flag4 = 0 
 Firstnum = "" 
 Secondnum = "" 
 Text1.Text = "" 
 Text1.SetFocus 
End Sub 
 
Private Sub Command31_Click() 
 On Error GoTo ErrorHandler 
 Dim I As Integer, Sum As Double 
 Dim Bla As Boolean, Blb As Boolean, Blc As Boolean, Bld As Boolean 
 If Text1.Text = "" Then 
  Nn = MsgBox("没有自变量!", vbOKOnly + vbExclamation, "操作错误警告!") 
  Exit Sub 
 Else 
  Bla = InStr(Text1.Text, "+") <> 0 
  Blb = InStr(Text1.Text, "-") > 1 
  Blc = InStr(Text1.Text, "*") <> 0 
  Bld = InStr(Text1.Text, "/") <> 0 
  If Bla Or Blb Or Blc Or Bld Then 
   Nn = MsgBox("请先按“=”得到结果,再按此按钮!", vbOKOnly + vbExclamation, "操作错误警告!") 
   Exit Sub 
  Else 
   If Val(Text1.Text) < 0 Or Val(Text1.Text) <> Int(Val(Text1.Text)) Then 
    Nn = MsgBox("计算阶乘时,自变量应为非负整数!", vbOKOnly + vbExclamation, "操作错误警告!") 
   Else 
    If Val(Text1.Text) = 0 Or Val(Text1.Text) = 1 Then 
     Text1.Text = 1 
     Firstnum = "1" 
     Secondnum = "" 
    Else 
     Sum = 1 
     For I = 1 To Val(Text1.Text) 
      Sum = Sum * I 
     Next I 
      Firstnum = Trim(Str(Sum)) 
      Text1.Text = Firstnum 
    End If 
   End If 
  End If 
 End If 
Sum = 0 
Text1.SetFocus 
ErrorHandler:   ' 错误处理程序。 
   Select Case Err.Number  ' 检查错误代号。 
        Case 6  ' 发生“数据溢出”的错误。 
      Nn = MsgBox("对不起,本计算器无法为如此大的数计算阶乘!", vbOKOnly + vbExclamation, "数据溢出") 
      Firstnum = "" 
     Secondnum = "" 
    Text1.Text = "" 
      Exit Sub 
    End Select 
End Sub 
 
Private Sub Command32_Click() 
 Dim Nn As Integer 
 If Flag = 0 Then 
  Nn = MsgBox("无统计数据!", vbOKOnly + vbExclamation, "数据错误警告") 
  Text1.Text = "" 
  Firstnum = "" 
  Secondnum = "" 
  Exit Sub 
 Else 
  Star1 = 1 
  Text1.Text = Trim(Str(Flag)) 
 End If 
 Text1.SetFocus 
End Sub 
 
Private Sub Command33_Click() 
 Dim T As Long 
 Dim Nn As Integer 
 If Flag = 0 Then 
  Nn = MsgBox("无统计数据!", vbOKOnly + vbExclamation, "数据错误警告") 
  Text1.Text = "" 
  Firstnum = "" 
  Secondnum = "" 
  Exit Sub 
 Else 
  Sum = 0 
  Star2 = 1 
  For T = 1 To Flag 
   Sum = Sum + Datas(T) 
  Next T 
   Text1.Text = Trim(Str(Sum)) 
 End If 
 Text1.SetFocus 
End Sub 
 
Private Sub Command34_Click() 
 Dim T As Long 
 Dim Nn As Integer 
 If Flag = 0 Then 
  Nn = MsgBox("无统计数据!", vbOKOnly + vbExclamation, "数据错误警告") 
  Text1.Text = "" 
  Firstnum = "" 
  Secondnum = "" 
  Exit Sub 
 Else 
  Sum = 0 
  Star3 = 1 
  For T = 1 To Flag 
   Sum = Sum + Datas(T) 
  Next T 
   Text1.Text = Trim(Str(Sum / Flag)) 
 End If 
 Text1.SetFocus 
End Sub 
 
Private Sub Command35_Click() 
 Dim T As Long 
 Dim Nn As Integer 
 If Flag = 0 Then 
  Nn = MsgBox("无统计数据!", vbOKOnly + vbExclamation, "数据错误警告") 
  Text1.Text = "" 
  Firstnum = "" 
  Secondnum = "" 
  Exit Sub 
 Else 
  Sum = 0 
  Star4 = 1 
  For T = 1 To Flag 
   Sum = Sum + (Datas(T)) ^ 2 
  Next T 
  Text1.Text = Trim(Str(Sum)) 
 End If 
 Text1.SetFocus 
End Sub 
 
Private Sub Command36_Click() 
 Dim T As Long, Sum1 As Double 
 Dim Nn As Integer 
 If Flag = 0 Then 
  Nn = MsgBox("无统计数据!", vbOKOnly + vbExclamation, "数据错误警告") 
  Text1.Text = "" 
  Firstnum = "" 
  Secondnum = "" 
  Exit Sub 
 Else 
  Sum = 0 
  Star5 = 1 
  For T = 1 To Flag 
   Sum = Sum + Datas(T) 
  Next T 
   Sum = Sum / Flag 
  For T = 1 To Flag 
   Sum1 = Sum1 + (Datas(T) - Sum) ^ 2 
  Next T 
  Text1.Text = Trim(Str(Sum1 / Flag)) 
  Sum1 = 0 
 End If 
 Text1.SetFocus 
End Sub 
 
Private Sub Command37_Click() 
 Dim T As Long, Sum1 As Double 
 Dim Nn As Integer 
 If Flag = 0 Then 
  Nn = MsgBox("无统计数据!", vbOKOnly + vbExclamation, "数据错误警告") 
  Text1.Text = "" 
  Firstnum = "" 
  Secondnum = "" 
  Exit Sub 
 Else 
  Sum = 0 
  Star5 = 1 
  For T = 1 To Flag 
   Sum = Sum + Datas(T) 
  Next T 
  Sum = Sum / Flag 
  For T = 1 To Flag 
   Sum1 = Sum1 + (Datas(T) - Sum) ^ 2 
  Next T 
  Text1.Text = Trim(Str(Sum1 / (Flag - 1))) 
  Sum1 = 0 
 End If 
 Text1.SetFocus 
End Sub 
 
Private Sub Command38_Click() 
 Dim Nn As Integer, I As Integer, Sum As Double 
 Dim Bla As Boolean, Blb As Boolean, Blc As Boolean, Bld As Boolean 
 If Text1.Text = "" Then 
  Nn = MsgBox("没有数据!", vbOKOnly + vbExclamation, "操作错误警告!") 
  Exit Sub 
 Else 
  If Star1 = 1 Or Star2 = 1 Or Star3 = 1 _ 
   Or Star4 = 1 Or Star5 = 1 Or Star6 = 1 Then 
   Flag = 0: Star1 = 0: Star2 = 0: Star3 = 0 
   Star4 = 0: Star5 = 0: Star6 = 0 
  End If 
  Bla = InStr(Text1.Text, "+") <> 0 
  Blb = InStr(Text1.Text, "-") > 1 
  Blc = InStr(Text1.Text, "*") <> 0 
  Bld = InStr(Text1.Text, "/") <> 0 
  If Bla Or Blb Or Blc Or Bld Then 
   Nn = MsgBox("请先按“=”得到结果,再按此按钮!", vbOKOnly + vbExclamation, "操作错误警告!") 
   Exit Sub 
  Else 
   Flag = Flag + 1 
   Datas(Flag) = Val(Text1.Text) 
   Text1.Text = "" 
   Firstnum = "" 
   Secondnum = "" 
  End If 
 End If 
 Text1.SetFocus 
End Sub 
 
Private Sub Command39_Click() 
Dim Strtxt As String 
Strtxt = Trim(Text1.Text) 
If Text1.Text = "" Then 
Exit Sub 
Else 
If InStr(Strtxt, "+") = 0 And InStr(Strtxt, "-") = 0 _ 
And InStr(Strtxt, "*") = 0 And InStr(Strtxt, "/") = 0 Then 
Firstnum = Left(Firstnum, Len(Firstnum) - 1) 
Text1.Text = Firstnum 
ElseIf InStr(Strtxt, "+") = Len(Strtxt) Then 
Flag1 = 0 
Text1.Text = Firstnum 
Flags = Firstnum 
ElseIf InStr(Strtxt, "-") = Len(Strtxt) Then 
Flag2 = 0 
Text1.Text = Firstnum 
Flags = Firstnum 
ElseIf InStr(Strtxt, "*") = Len(Strtxt) Then 
Flag3 = 0 
Text1.Text = Firstnum 
Flags = Firstnum 
ElseIf InStr(Strtxt, "/") = Len(Strtxt) Then 
Flag4 = 0 
Text1.Text = Firstnum 
Flags = Firstnum 
Else 
Secondnum = Left(Secondnum, Len(Secondnum) - 1) 
Text1.Text = Left(Strtxt, Len(Strtxt) - 1) 
End If 
End If 
Text1.SetFocus 
End Sub 
 
Private Sub Command4_Click() 
 If Flag1 = 0 And Flag2 = 0 And Flag3 = 0 And Flag4 = 0 And Flag5 = 0 And Flag6 = 0 Then 
    Firstnum = Firstnum & "4" 
  Text1.Text = Trim(Firstnum) 
 Else 
  If Flag5 = 1 Or Flag6 = 1 Then 
  Text1.Text = "" 
  Secondnum = Secondnum & "4" 
  Text1.Text = Trim(Flags & Secondnum) 
  Else 
  Secondnum = Secondnum & "4" 
  Text1.Text = Trim(Flags & Secondnum) 
  End If 
 End If 
 Text1.SetFocus 
End Sub 
 
Private Sub Command40_Click(Index As Integer) 
Dim Dlpara As Double, strTemp As String 
If Text1.Text = "" Then 
  Nn = MsgBox("没有自变量!", vbOKOnly + vbExclamation, "操作错误警告!") 
  Exit Sub 
 Else 
     If Flag1 = 1 Or Flag2 = 1 Or Flag3 = 1 Or Flag4 = 1 Then 
    Dlpara = Val(Fruit(Firstnum, Secondnum)) 
   Else 
    Dlpara = Val(Firstnum) 
     End If 
  End If 
  Select Case Index 
  Case 0 
  strTemp = Str(ArcSin(Dlpara)) 
Case 1 
  strTemp = Str(ArcCos(Dlpara)) 
  Case 2 
   strTemp = Str(Cot(Dlpara)) 
  Case 3 
  strTemp = Str(ArcCot(Dlpara)) 
  Case 4 
  strTemp = Str(Sh(Dlpara)) 
  Case 5 
  strTemp = Str(ArcSh(Dlpara)) 
  Case 6 
  strTemp = Str(Ch(Dlpara)) 
  Case 7 
  strTemp = Str(ArcCh(Dlpara)) 
  Case 8 
    If Flag1 = 1 Or Flag2 = 1 Or Flag3 = 1 Or Flag4 = 1 Then 
   strTemp = Trim(Dlpara ^ (1 / 3)) 
  Else 
   strTemp = Trim(Dlpara ^ (1 / 3)) 
  End If 
  Firstnum = Text1.Text 
 Secondnum = "" 
 Flag1 = 0 
 Flag2 = 0 
 Flag3 = 0 
 Flag4 = 0 
 Text1.SetFocus 
  Case 9 
  Flag6 = 1 
  Exit Sub 
  Case 11 
  Flag5 = 1 
  Exit Sub 
  Case 12 
  strTemp = Str(Th(Dlpara)) 
  Case 13 
  strTemp = Str(ArcTh(Dlpara)) 
  Case 14 
  strTemp = Str(Cth(Dlpara)) 
  Case 15 
  strTemp = Str(ArcCth(Dlpara)) 
End Select 
Text1.Text = strTemp 
 Firstnum = Text1.Text 
 Secondnum = "" 
 Flag1 = 0 
 Flag2 = 0 
 Flag3 = 0 
 Flag4 = 0 
 Flag5 = 0 
 Flag6 = 0 
 Text1.SetFocus 
End Sub 
 
Private Sub Command41_Click() 
Dim len0, len1, len2, len3, len4 As Integer 
len0 = Len(Text1.Text) 
len1 = InStr(Text1.Text, "+") 
len2 = InStr(Text1.Text, "-") 
len3 = InStr(Text1.Text, "*") 
len4 = InStr(Text1.Text, "/") 
If len0 = 0 Then 
Firstnum = Str(PI) 
Text1.Text = Firstnum 
ElseIf len0 = len1 Or len0 = len1 Or len0 = len2 Or len0 = len3 Or len0 = len4 Then 
Secondnum = Str(PI) 
Text1.Text = Text1.Text & Secondnum 
Else 
Exit Sub 
End If 
End Sub 
 
Private Sub Command5_Click() 
 If Flag1 = 0 And Flag2 = 0 And Flag3 = 0 And Flag4 = 0 And Flag5 = 0 And Flag6 = 0 Then 
    Firstnum = Firstnum & "5" 
  Text1.Text = Trim(Firstnum) 
 Else 
  If Flag5 = 1 Or Flag6 = 1 Then 
  Text1.Text = "" 
  Secondnum = Secondnum & "5" 
  Text1.Text = Trim(Flags & Secondnum) 
  Else 
  Secondnum = Secondnum & "5" 
  Text1.Text = Trim(Flags & Secondnum) 
  End If 
 End If 
 Text1.SetFocus 
End Sub 
 
Private Sub Command6_Click() 
 If Flag1 = 0 And Flag2 = 0 And Flag3 = 0 And Flag4 = 0 And Flag5 = 0 And Flag6 = 0 Then 
    Firstnum = Firstnum & "6" 
  Text1.Text = Trim(Firstnum) 
 Else 
  If Flag5 = 1 Or Flag6 = 1 Then 
  Text1.Text = "" 
  Secondnum = Secondnum & "6" 
  Text1.Text = Trim(Flags & Secondnum) 
  Else 
  Secondnum = Secondnum & "6" 
  Text1.Text = Trim(Flags & Secondnum) 
  End If 
 End If 
 Text1.SetFocus 
End Sub 
 
Private Sub Command7_Click() 
 If Flag1 = 0 And Flag2 = 0 And Flag3 = 0 And Flag4 = 0 And Flag5 = 0 And Flag6 = 0 Then 
    Firstnum = Firstnum & "7" 
  Text1.Text = Trim(Firstnum) 
 Else 
  If Flag5 = 1 Or Flag6 = 1 Then 
  Text1.Text = "" 
  Secondnum = Secondnum & "7" 
  Text1.Text = Trim(Flags & Secondnum) 
  Else 
  Secondnum = Secondnum & "7" 
  Text1.Text = Trim(Flags & Secondnum) 
  End If 
 End If 
 Text1.SetFocus 
End Sub 
 
Private Sub Command8_Click() 
 If Flag1 = 0 And Flag2 = 0 And Flag3 = 0 And Flag4 = 0 And Flag5 = 0 And Flag6 = 0 Then 
    Firstnum = Firstnum & "8" 
  Text1.Text = Trim(Firstnum) 
 Else 
 If Flag5 = 1 Or Flag6 = 1 Then 
  Text1.Text = "" 
  Secondnum = Secondnum & "8" 
  Text1.Text = Trim(Flags & Secondnum) 
  Else 
  Secondnum = Secondnum & "8" 
  Text1.Text = Trim(Flags & Secondnum) 
  End If 
 End If 
 Text1.SetFocus 
End Sub 
 
Private Sub Command9_Click() 
 If Flag1 = 0 And Flag2 = 0 And Flag3 = 0 And Flag4 = 0 And Flag5 = 0 And Flag6 = 0 Then 
    Firstnum = Firstnum & "9" 
  Text1.Text = Trim(Firstnum) 
 Else 
  If Flag5 = 1 Or Flag6 = 1 Then 
  Text1.Text = "" 
  Secondnum = Secondnum & "9" 
  Text1.Text = Trim(Flags & Secondnum) 
  Else 
  Secondnum = Secondnum & "9" 
  Text1.Text = Trim(Flags & Secondnum) 
  End If 
 End If 
 Text1.SetFocus 
End Sub 
 
Private Sub Form_Activate() 
Text1.SetFocus 
End Sub 
 
Private Sub Form_Load() 
Call Move((Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2) 
Calculator.Caption = "标准型计算器" 
 Me.Height = 4100 
 Frame4.Visible = False 
 Frame5.Visible = False 
 Option1.Visible = False 
 Option2.Visible = False 
 Frame1.Top = 550 
 Frame2.Top = 550 
 Frame3.Top = 550 
 Text1.Text = "" 
End Sub 
 
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single) 
If Button = 2 Then 
PopupMenu mnuedit 
If Text1.SelLength = 0 Then 
mnueditcopy.Enabled = False 
ElseIf Text1.SelLength <> 0 Then 
mnueditcopy.Enabled = True 
End If 
End If 
End Sub 
 
Private Sub menu1_1_Click() 
 Me.Height = 4100 
 Frame4.Visible = False 
 Frame5.Visible = False 
 Option2.Visible = False 
 Option1.Visible = False 
 Frame1.Top = 550 
 Frame2.Top = 550 
 Frame3.Top = 550 
 Calculator.Caption = "标准型计算器" 
 Text1.SetFocus 
 Call Move((Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2) 
End Sub 
 
Private Sub menu1_2_Click() 
 Me.Height = 6650 
 Frame1.Top = 3120 
 Frame2.Top = 3120 
 Frame3.Top = 3120 
 Frame4.Visible = True 
 Frame5.Visible = True 
 Option2.Visible = True 
 Option1.Visible = True 
Calculator.Caption = "科学型计算器" 
Call Move((Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2) 
 Text1.SetFocus 
End Sub 
 
Private Sub menu2_1_Click() 
About.Show 
End Sub 
 
Private Sub menu2_2_Click() 
Help.Show 
End Sub 
 
Private Sub menu2_3_Click() 
End 
End Sub 
 
Private Sub mnuedit_Click() 
If Text1.SelLength = 0 Then 
mnueditcopy.Enabled = False 
ElseIf Text1.SelLength <> 0 Then 
mnueditcopy.Enabled = True 
End If 
End Sub 
 
Private Sub mnuEditCopy_Click() 
Clipboard.Clear 
    Clipboard.SetText Text1.SelText 
End Sub 
 
Private Sub mnueditselall_Click() 
Text1.SelStart = 0 
Text1.SelLength = Len(Text1.Text) 
End Sub 
 
Private Sub Text1_Change() 
Text1.SelStart = Len(Text1.Text) 
End Sub 
 
Private Sub Text1_KeyPress(KeyAscii As Integer) 
Dim Keynum As Integer 
Keynum = KeyAscii 
Select Case Keynum 
Case 49 
Command1.Value = True 
Case 50 
Command2.Value = True 
Case 51 
Command3.Value = True 
Case 52 
Command4.Value = True 
Case 53 
Command5.Value = True 
Case 54 
Command6.Value = True 
Case 55 
Command7.Value = True 
Case 56 
Command8.Value = True 
Case 57 
Command9.Value = True 
Case 48 
Command10.Value = True 
Case 46 
Command11.Value = True 
Case 43 
Command13.Value = True 
Case 45 
Command14.Value = True 
Case 42 
Command15.Value = True 
Case 47 
Command16.Value = True 
Case 61 
Command17.Value = True 
Case 13 
Command17.Value = True 
Case vbKeyBack 
Command39.Value = True 
Case Else 
Exit Sub 
End Select 
End Sub 
Private Function ArcSin(x As Double) As Double 
Dim Nn As Integer, Temp As Double 
If Abs(x) > 1 Then 
  Nn = MsgBox("自变量越界!", vbOKOnly + vbExclamation, "操作错误警告!") 
  Text1.Text = "" 
  Exit Function 
Else 
  If x = 1 Then 
  Temp = PI / 2 
  ElseIf x = -1 Then 
  Temp = -PI / 2 
  Else 
  Temp = Atn(x / Sqr(1 - x * x)) 
  End If 
End If 
ArcSin = Temp 
End Function 
Private Function ArcCos(x As Double) As Double 
Dim Nn As Integer, Temp As Double 
If Abs(x) > 1 Then 
  Nn = MsgBox("自变量越界!", vbOKOnly + vbExclamation, "操作错误警告!") 
  Text1.Text = "" 
  Exit Function 
Else 
  If x = 0 Then 
  Temp = PI / 2 
   Else 
  Temp = Atn(Sqr(1 - x * x) / x) 
  End If 
End If 
ArcCos = Temp 
End Function 
Private Function ArcCot(x As Double) As Double 
Dim Temp As Double 
  If x = 0 Then 
  Temp = PI / 2 
   Else 
  Temp = Atn(1 / x) 
  End If 
ArcCot = Temp 
End Function 
 
Private Function Cot(x As Double) As Double 
Dim Nn As Integer, Temp As Double 
  If x = 0 Then 
  Nn = MsgBox("函数无意义!", vbOKOnly + vbExclamation, "操作错误警告!") 
  Text1.Text = "" 
  Exit Function 
   Else 
  Temp = 1 / Atn(x) 
  End If 
Cot = Temp 
End Function 
 
Private Function Sec(x As Double) As Double 
Dim Nn As Integer, Temp As Double 
  If Cos(x) = 0 Then 
  Nn = MsgBox("函数无意义!", vbOKOnly + vbExclamation, "操作错误警告!") 
  Text1.Text = "" 
  Exit Function 
   Else 
  Temp = 1 / Cos(x) 
  End If 
Sec = Temp 
End Function 
 
Private Function Csc(x As Double) As Double 
Dim Nn As Integer, Temp As Double 
  If Sin(x) = 0 Then 
  Nn = MsgBox("函数无意义!", vbOKOnly + vbExclamation, "操作错误警告!") 
  Text1.Text = "" 
  Exit Function 
   Else 
  Temp = 1 / Sin(x) 
  End If 
Csc = Temp 
End Function 
 
Private Function ArcCsc(x As Double) As Double 
Dim Nn As Integer, Temp As Double 
  If Abs(x) < 1 Then 
  Nn = MsgBox("自变量越界!", vbOKOnly + vbExclamation, "操作错误警告!") 
  Text1.Text = "" 
  Exit Function 
   Else 
  Temp = Atn(x / Sqr(x ^ 2 - 1)) + (Sgn(x) - 1) * 2 * Atn(1) 
  End If 
ArcCsc = Temp 
End Function 
Private Function Sh(x As Double) As Double 
Dim Temp As Double 
   Temp = (Exp(x) - Exp(-x)) / 2 
   Sh = Temp 
End Function 
Private Function Ch(x As Double) As Double 
Dim Temp As Double 
   Temp = (Exp(x) + Exp(-x)) / 2 
   Ch = Temp 
End Function 
 
Private Function Th(x As Double) As Double 
Dim Temp As Double 
   Temp = Sh(x) / Ch(x) 
   Th = Temp 
End Function 
Private Function Cth(x As Double) As Double 
Dim Temp As Double 
   Temp = Ch(x) / Sh(x) 
   Cth = Temp 
End Function 
 
Private Function ArcSh(x As Double) As Double 
Dim Temp As Double 
 
   Temp = Log(x + Sqr(x ^ 2 + 1)) 
   ArcSh = Temp 
End Function 
 
Private Function ArcCh(x As Double) As Double 
Dim Temp As Double, Nn As Integer 
If x ^ 2 - 1 < 0 Or x + Sqr(x ^ 2 - 1) <= 0 Then 
 Nn = MsgBox("自变量越界!", vbOKOnly + vbExclamation, "操作错误警告!") 
  Text1.Text = "" 
  Exit Function 
  End If 
   Temp = Log(x + Sqr(x ^ 2 - 1)) 
   ArcCh = Temp 
End Function 
 
Private Function ArcTh(x As Double) As Double 
Dim Temp As Double, Nn As Integer 
If x >= 1 Then 
 Nn = MsgBox("自变量越界!", vbOKOnly + vbExclamation, "操作错误警告!") 
  Text1.Text = "" 
  Exit Function 
  End If 
   Temp = Log((1 + x) / (1 - x)) / 2 
   ArcTh = Temp 
End Function 
 
Private Function ArcCth(x As Double) As Double 
Dim Temp As Double, Nn As Integer 
If x <= 1 Then 
 Nn = MsgBox("自变量越界!", vbOKOnly + vbExclamation, "操作错误警告!") 
  Text1.Text = "" 
  Exit Function 
  End If 
   Temp = Log((1 + x) / (x - 1)) / 2 
   ArcCth = Temp 
End Function 
 
 
Private Function ArcSec(x As Double) As Double 
Dim Nn As Integer, Temp As Double 
  If Abs(x) < 1 Then 
  Nn = MsgBox("自变量越界!", vbOKOnly + vbExclamation, "操作错误警告!") 
  Text1.Text = "" 
  Exit Function 
   Else 
  Temp = Atn(x / Sqr(x ^ 2 - 1)) + Sgn((x) - 1) * 2 * Atn(1) 
  End If 
ArcSec = Temp 
End Function