home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD100309202000.psc / Main.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2000-09-21  |  49.5 KB  |  1,583 lines

  1. VERSION 5.00
  2. Begin VB.Form frmMain 
  3.    BackColor       =   &H80000010&
  4.    Caption         =   "Calculator (fx-35A)"
  5.    ClientHeight    =   5715
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   5415
  9.    Icon            =   "Main.frx":0000
  10.    KeyPreview      =   -1  'True
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    ScaleHeight     =   5715
  14.    ScaleWidth      =   5415
  15.    StartUpPosition =   2  'CenterScreen
  16.    Begin VB.TextBox EXP 
  17.       Alignment       =   1  'Right Justify
  18.       Appearance      =   0  'Flat
  19.       BackColor       =   &H80000006&
  20.       BorderStyle     =   0  'None
  21.       ForeColor       =   &H0000FF00&
  22.       Height          =   195
  23.       Left            =   4920
  24.       MaxLength       =   3
  25.       MultiLine       =   -1  'True
  26.       TabIndex        =   66
  27.       Text            =   "Main.frx":0442
  28.       Top             =   840
  29.       Visible         =   0   'False
  30.       Width           =   255
  31.    End
  32.    Begin VB.TextBox Statistic_score 
  33.       Alignment       =   2  'Center
  34.       BackColor       =   &H80000006&
  35.       BorderStyle     =   0  'None
  36.       ForeColor       =   &H0000FF00&
  37.       Height          =   225
  38.       Left            =   3960
  39.       TabIndex        =   65
  40.       Text            =   "n"
  41.       Top             =   840
  42.       Visible         =   0   'False
  43.       Width           =   375
  44.    End
  45.    Begin VB.TextBox Memory_indicator 
  46.       BackColor       =   &H80000006&
  47.       BorderStyle     =   0  'None
  48.       ForeColor       =   &H0000FF00&
  49.       Height          =   195
  50.       Left            =   1080
  51.       TabIndex        =   64
  52.       Text            =   "Min"
  53.       Top             =   240
  54.       Width           =   375
  55.    End
  56.    Begin VB.CommandButton E 
  57.       BackColor       =   &H80000018&
  58.       Height          =   375
  59.       Left            =   3360
  60.       Picture         =   "Main.frx":0445
  61.       Style           =   1  'Graphical
  62.       TabIndex        =   63
  63.       ToolTipText     =   "Constant e"
  64.       Top             =   3120
  65.       Width           =   495
  66.    End
  67.    Begin VB.CommandButton Statistical_data 
  68.       BackColor       =   &H00FFFF80&
  69.       Caption         =   "DATA"
  70.       BeginProperty Font 
  71.          Name            =   "MS Sans Serif"
  72.          Size            =   8.25
  73.          Charset         =   0
  74.          Weight          =   700
  75.          Underline       =   0   'False
  76.          Italic          =   0   'False
  77.          Strikethrough   =   0   'False
  78.       EndProperty
  79.       Height          =   495
  80.       Left            =   4560
  81.       Style           =   1  'Graphical
  82.       TabIndex        =   56
  83.       ToolTipText     =   "Statistical data entry"
  84.       Top             =   4440
  85.       Width           =   735
  86.    End
  87.    Begin VB.TextBox Statistics_mode 
  88.       BackColor       =   &H80000007&
  89.       BorderStyle     =   0  'None
  90.       ForeColor       =   &H0000FF00&
  91.       Height          =   195
  92.       Left            =   480
  93.       TabIndex        =   55
  94.       Text            =   "SD"
  95.       Top             =   840
  96.       Width           =   375
  97.    End
  98.    Begin VB.TextBox Mode_type 
  99.       BackColor       =   &H80000007&
  100.       BorderStyle     =   0  'None
  101.       ForeColor       =   &H0000FF00&
  102.       Height          =   285
  103.       Left            =   240
  104.       TabIndex        =   54
  105.       Text            =   "DEG"
  106.       Top             =   240
  107.       Width           =   375
  108.    End
  109.    Begin VB.CommandButton Random_number 
  110.       BackColor       =   &H80000018&
  111.       Caption         =   "RAN"
  112.       BeginProperty Font 
  113.          Name            =   "MS Sans Serif"
  114.          Size            =   8.25
  115.          Charset         =   0
  116.          Weight          =   700
  117.          Underline       =   0   'False
  118.          Italic          =   0   'False
  119.          Strikethrough   =   0   'False
  120.       EndProperty
  121.       Height          =   375
  122.       Left            =   3960
  123.       Style           =   1  'Graphical
  124.       TabIndex        =   53
  125.       ToolTipText     =   "Random number"
  126.       Top             =   3120
  127.       Width           =   615
  128.    End
  129.    Begin VB.CommandButton Memory_clear 
  130.       BackColor       =   &H80000018&
  131.       Caption         =   "MC"
  132.       BeginProperty Font 
  133.          Name            =   "MS Sans Serif"
  134.          Size            =   9.75
  135.          Charset         =   0
  136.          Weight          =   700
  137.          Underline       =   0   'False
  138.          Italic          =   0   'False
  139.          Strikethrough   =   0   'False
  140.       EndProperty
  141.       Height          =   375
  142.       Left            =   2040
  143.       Style           =   1  'Graphical
  144.       TabIndex        =   52
  145.       ToolTipText     =   "Clear memory"
  146.       Top             =   3120
  147.       Width           =   615
  148.    End
  149.    Begin VB.CommandButton PI 
  150.       BackColor       =   &H80000018&
  151.       Caption         =   "p"
  152.       BeginProperty Font 
  153.          Name            =   "Symbol"
  154.          Size            =   14.25
  155.          Charset         =   2
  156.          Weight          =   400
  157.          Underline       =   0   'False
  158.          Italic          =   0   'False
  159.          Strikethrough   =   0   'False
  160.       EndProperty
  161.       Height          =   375
  162.       Left            =   2760
  163.       Style           =   1  'Graphical
  164.       TabIndex        =   51
  165.       ToolTipText     =   "Constant pi"
  166.       Top             =   3120
  167.       Width           =   495
  168.    End
  169.    Begin VB.CommandButton Memory_recall 
  170.       BackColor       =   &H80000018&
  171.       Caption         =   "MR"
  172.       BeginProperty Font 
  173.          Name            =   "MS Sans Serif"
  174.          Size            =   9.75
  175.          Charset         =   0
  176.          Weight          =   700
  177.          Underline       =   0   'False
  178.          Italic          =   0   'False
  179.          Strikethrough   =   0   'False
  180.       EndProperty
  181.       Height          =   375
  182.       Left            =   1440
  183.       Style           =   1  'Graphical
  184.       TabIndex        =   50
  185.       ToolTipText     =   "Memory recall"
  186.       Top             =   3120
  187.       Width           =   495
  188.    End
  189.    Begin VB.CommandButton Memory_input 
  190.       BackColor       =   &H80000018&
  191.       Caption         =   "Min"
  192.       BeginProperty Font 
  193.          Name            =   "MS Sans Serif"
  194.          Size            =   9.75
  195.          Charset         =   0
  196.          Weight          =   700
  197.          Underline       =   0   'False
  198.          Italic          =   0   'False
  199.          Strikethrough   =   0   'False
  200.       EndProperty
  201.       Height          =   375
  202.       Left            =   720
  203.       Style           =   1  'Graphical
  204.       TabIndex        =   49
  205.       ToolTipText     =   "Memory input"
  206.       Top             =   3120
  207.       Width           =   615
  208.    End
  209.    Begin VB.CommandButton Population_standard_deviation 
  210.       BackColor       =   &H80000018&
  211.       Height          =   375
  212.       Left            =   120
  213.       Picture         =   "Main.frx":07C7
  214.       Style           =   1  'Graphical
  215.       TabIndex        =   48
  216.       ToolTipText     =   "Population standard deviation"
  217.       Top             =   3120
  218.       Width           =   495
  219.    End
  220.    Begin VB.CommandButton Sample_standard_deviation 
  221.       BackColor       =   &H80000018&
  222.       Height          =   375
  223.       Left            =   4560
  224.       Picture         =   "Main.frx":0F41
  225.       Style           =   1  'Graphical
  226.       TabIndex        =   47
  227.       ToolTipText     =   "Sample standard deviation"
  228.       Top             =   2640
  229.       Width           =   735
  230.    End
  231.    Begin VB.CommandButton Mean 
  232.       BackColor       =   &H80000018&
  233.       Height          =   375
  234.       Left            =   3840
  235.       Picture         =   "Main.frx":19D3
  236.       Style           =   1  'Graphical
  237.       TabIndex        =   46
  238.       ToolTipText     =   "Arithmetic mean"
  239.       Top             =   2640
  240.       Width           =   615
  241.    End
  242.    Begin VB.CommandButton Clear_s_r 
  243.       BackColor       =   &H0080C0FF&
  244.       Caption         =   "KAC"
  245.       BeginProperty Font 
  246.          Name            =   "MS Sans Serif"
  247.          Size            =   8.25
  248.          Charset         =   0
  249.          Weight          =   700
  250.          Underline       =   0   'False
  251.          Italic          =   0   'False
  252.          Strikethrough   =   0   'False
  253.       EndProperty
  254.       Height          =   375
  255.       Left            =   4680
  256.       Style           =   1  'Graphical
  257.       TabIndex        =   45
  258.       ToolTipText     =   "Clear statistical register"
  259.       Top             =   3120
  260.       Width           =   615
  261.    End
  262.    Begin VB.CommandButton Sum 
  263.       BackColor       =   &H80000018&
  264.       BeginProperty Font 
  265.          Name            =   "Symbol"
  266.          Size            =   11.25
  267.          Charset         =   2
  268.          Weight          =   700
  269.          Underline       =   0   'False
  270.          Italic          =   0   'False
  271.          Strikethrough   =   0   'False
  272.       EndProperty
  273.       Height          =   375
  274.       Left            =   3000
  275.       Picture         =   "Main.frx":1F3D
  276.       Style           =   1  'Graphical
  277.       TabIndex        =   44
  278.       ToolTipText     =   "Sum of values"
  279.       Top             =   2640
  280.       Width           =   735
  281.    End
  282.    Begin VB.CommandButton Reciprocal 
  283.       BackColor       =   &H80000018&
  284.       BeginProperty Font 
  285.          Name            =   "MS Sans Serif"
  286.          Size            =   9.75
  287.          Charset         =   0
  288.          Weight          =   700
  289.          Underline       =   0   'False
  290.          Italic          =   0   'False
  291.          Strikethrough   =   0   'False
  292.       EndProperty
  293.       Height          =   375
  294.       Left            =   2280
  295.       Picture         =   "Main.frx":2567
  296.       Style           =   1  'Graphical
  297.       TabIndex        =   43
  298.       ToolTipText     =   "Reciprocal"
  299.       Top             =   2640
  300.       Width           =   615
  301.    End
  302.    Begin VB.CommandButton x_Power 
  303.       BackColor       =   &H80000018&
  304.       Height          =   375
  305.       Left            =   1560
  306.       Picture         =   "Main.frx":2DE9
  307.       Style           =   1  'Graphical
  308.       TabIndex        =   42
  309.       Tag             =   "x^y"
  310.       ToolTipText     =   "Power of any number"
  311.       Top             =   2640
  312.       Width           =   615
  313.    End
  314.    Begin VB.CommandButton Ln 
  315.       BackColor       =   &H80000018&
  316.       Caption         =   "ln"
  317.       BeginProperty Font 
  318.          Name            =   "MS Sans Serif"
  319.          Size            =   9.75
  320.          Charset         =   0
  321.          Weight          =   700
  322.          Underline       =   0   'False
  323.          Italic          =   0   'False
  324.          Strikethrough   =   0   'False
  325.       EndProperty
  326.       Height          =   375
  327.       Left            =   840
  328.       Style           =   1  'Graphical
  329.       TabIndex        =   41
  330.       ToolTipText     =   "Natural logarithm"
  331.       Top             =   2640
  332.       Width           =   615
  333.    End
  334.    Begin VB.CommandButton Log 
  335.       BackColor       =   &H80000018&
  336.       Caption         =   "log"
  337.       BeginProperty Font 
  338.          Name            =   "MS Sans Serif"
  339.          Size            =   9.75
  340.          Charset         =   0
  341.          Weight          =   700
  342.          Underline       =   0   'False
  343.          Italic          =   0   'False
  344.          Strikethrough   =   0   'False
  345.       EndProperty
  346.       Height          =   375
  347.       Left            =   3840
  348.       Style           =   1  'Graphical
  349.       TabIndex        =   40
  350.       Tag             =   "lg"
  351.       ToolTipText     =   "Common logarithm"
  352.       Top             =   2160
  353.       Width           =   735
  354.    End
  355.    Begin VB.TextBox Percentage_indicator 
  356.       BackColor       =   &H80000007&
  357.       BorderStyle     =   0  'None
  358.       BeginProperty Font 
  359.          Name            =   "MS Sans Serif"
  360.          Size            =   9.75
  361.          Charset         =   0
  362.          Weight          =   700
  363.          Underline       =   0   'False
  364.          Italic          =   0   'False
  365.          Strikethrough   =   0   'False
  366.       EndProperty
  367.       ForeColor       =   &H0000FF00&
  368.       Height          =   240
  369.       Left            =   3000
  370.       TabIndex        =   39
  371.       Top             =   795
  372.       Width           =   495
  373.    End
  374.    Begin VB.CommandButton Change_sign 
  375.       BackColor       =   &H80000018&
  376.       Caption         =   "+/-"
  377.       BeginProperty Font 
  378.          Name            =   "MS Sans Serif"
  379.          Size            =   13.5
  380.          Charset         =   0
  381.          Weight          =   400
  382.          Underline       =   0   'False
  383.          Italic          =   0   'False
  384.          Strikethrough   =   0   'False
  385.       EndProperty
  386.       Height          =   375
  387.       Left            =   1680
  388.       Style           =   1  'Graphical
  389.       TabIndex        =   38
  390.       ToolTipText     =   "Change sign"
  391.       Top             =   2160
  392.       Width           =   615
  393.    End
  394.    Begin VB.CommandButton Percentage 
  395.       Caption         =   "%"
  396.       BeginProperty Font 
  397.          Name            =   "MS Sans Serif"
  398.          Size            =   12
  399.          Charset         =   0
  400.          Weight          =   700
  401.          Underline       =   0   'False
  402.          Italic          =   0   'False
  403.          Strikethrough   =   0   'False
  404.       EndProperty
  405.       Height          =   495
  406.       Left            =   3120
  407.       TabIndex        =   37
  408.       ToolTipText     =   "Percentage"
  409.       Top             =   5040
  410.       Width           =   495
  411.    End
  412.    Begin VB.CommandButton Scientific_notation 
  413.       Caption         =   "EXP"
  414.       BeginProperty Font 
  415.          Name            =   "MS Sans Serif"
  416.          Size            =   8.25
  417.          Charset         =   0
  418.          Weight          =   700
  419.          Underline       =   0   'False
  420.          Italic          =   0   'False
  421.          Strikethrough   =   0   'False
  422.       EndProperty
  423.       Height          =   495
  424.       Left            =   4560
  425.       TabIndex        =   36
  426.       ToolTipText     =   "Scientific notation"
  427.       Top             =   5040
  428.       Width           =   735
  429.    End
  430.    Begin VB.CommandButton Trig 
  431.       BackColor       =   &H80000018&
  432.       Caption         =   "tan-1"
  433.       BeginProperty Font 
  434.          Name            =   "MS Sans Serif"
  435.          Size            =   9.75
  436.          Charset         =   0
  437.          Weight          =   700
  438.          Underline       =   0   'False
  439.          Italic          =   0   'False
  440.          Strikethrough   =   0   'False
  441.       EndProperty
  442.       Height          =   375
  443.       Index           =   8
  444.       Left            =   960
  445.       Style           =   1  'Graphical
  446.       TabIndex        =   35
  447.       ToolTipText     =   "Inverse tangent"
  448.       Top             =   2160
  449.       Width           =   615
  450.    End
  451.    Begin VB.CommandButton Trig 
  452.       BackColor       =   &H80000018&
  453.       Caption         =   "cos-1"
  454.       BeginProperty Font 
  455.          Name            =   "MS Sans Serif"
  456.          Size            =   9.75
  457.          Charset         =   0
  458.          Weight          =   700
  459.          Underline       =   0   'False
  460.          Italic          =   0   'False
  461.          Strikethrough   =   0   'False
  462.       EndProperty
  463.       Height          =   375
  464.       Index           =   7
  465.       Left            =   120
  466.       Style           =   1  'Graphical
  467.       TabIndex        =   34
  468.       ToolTipText     =   "Inverse cosine"
  469.       Top             =   2160
  470.       Width           =   735
  471.    End
  472.    Begin VB.CommandButton Trig 
  473.       BackColor       =   &H80000018&
  474.       Caption         =   "sin-1"
  475.       BeginProperty Font 
  476.          Name            =   "MS Sans Serif"
  477.          Size            =   9.75
  478.          Charset         =   0
  479.          Weight          =   700
  480.          Underline       =   0   'False
  481.          Italic          =   0   'False
  482.          Strikethrough   =   0   'False
  483.       EndProperty
  484.       Height          =   375
  485.       Index           =   6
  486.       Left            =   4680
  487.       Style           =   1  'Graphical
  488.       TabIndex        =   33
  489.       ToolTipText     =   "Inverse sine"
  490.       Top             =   1680
  491.       Width           =   615
  492.    End
  493.    Begin VB.CommandButton Trig 
  494.       BackColor       =   &H80000018&
  495.       Caption         =   "cosec"
  496.       BeginProperty Font 
  497.          Name            =   "MS Sans Serif"
  498.          Size            =   9.75
  499.          Charset         =   0
  500.          Weight          =   700
  501.          Underline       =   0   'False
  502.          Italic          =   0   'False
  503.          Strikethrough   =   0   'False
  504.       EndProperty
  505.       Height          =   375
  506.       Index           =   3
  507.       Left            =   2640
  508.       Style           =   1  'Graphical
  509.       TabIndex        =   32
  510.       ToolTipText     =   "Cosecant"
  511.       Top             =   1680
  512.       Width           =   735
  513.    End
  514.    Begin VB.CommandButton Trig 
  515.       BackColor       =   &H80000018&
  516.       Caption         =   "cot"
  517.       BeginProperty Font 
  518.          Name            =   "MS Sans Serif"
  519.          Size            =   9.75
  520.          Charset         =   0
  521.          Weight          =   700
  522.          Underline       =   0   'False
  523.          Italic          =   0   'False
  524.          Strikethrough   =   0   'False
  525.       EndProperty
  526.       Height          =   375
  527.       Index           =   5
  528.       Left            =   4080
  529.       Style           =   1  'Graphical
  530.       TabIndex        =   31
  531.       ToolTipText     =   "Cotangent"
  532.       Top             =   1680
  533.       Width           =   495
  534.    End
  535.    Begin VB.CommandButton Trig 
  536.       BackColor       =   &H80000018&
  537.       Caption         =   "sec"
  538.       BeginProperty Font 
  539.          Name            =   "MS Sans Serif"
  540.          Size            =   9.75
  541.          Charset         =   0
  542.          Weight          =   700
  543.          Underline       =   0   'False
  544.          Italic          =   0   'False
  545.          Strikethrough   =   0   'False
  546.       EndProperty
  547.       Height          =   375
  548.       Index           =   4
  549.       Left            =   3480
  550.       Style           =   1  'Graphical
  551.       TabIndex        =   30
  552.       ToolTipText     =   "Secant"
  553.       Top             =   1680
  554.       Width           =   495
  555.    End
  556.    Begin VB.CommandButton Equals 
  557.       Caption         =   "="
  558.       BeginProperty Font 
  559.          Name            =   "MS Sans Serif"
  560.          Size            =   13.5
  561.          Charset         =   0
  562.          Weight          =   700
  563.          Underline       =   0   'False
  564.          Italic          =   0   'False
  565.          Strikethrough   =   0   'False
  566.       EndProperty
  567.       Height          =   495
  568.       Left            =   3840
  569.       TabIndex        =   29
  570.       Top             =   5040
  571.       Width           =   495
  572.    End
  573.    Begin VB.TextBox Function 
  574.       Alignment       =   2  'Center
  575.       BackColor       =   &H80000007&
  576.       BorderStyle     =   0  'None
  577.       ForeColor       =   &H0000FF00&
  578.       Height          =   195
  579.       Left            =   2160
  580.       TabIndex        =   28
  581.       Text            =   "f(x)"
  582.       Top             =   840
  583.       Width           =   495
  584.    End
  585.    Begin VB.TextBox Mode_indicator 
  586.       Alignment       =   2  'Center
  587.       BackColor       =   &H80000007&
  588.       BorderStyle     =   0  'None
  589.       ForeColor       =   &H0000FF00&
  590.       Height          =   195
  591.       Left            =   1680
  592.       TabIndex        =   27
  593.       Text            =   "M"
  594.       Top             =   840
  595.       Width           =   375
  596.    End
  597.    Begin VB.TextBox Number_space 
  598.       Alignment       =   1  'Right Justify
  599.       BackColor       =   &H80000007&
  600.       BorderStyle     =   0  'None
  601.       BeginProperty Font 
  602.          Name            =   "Arial"
  603.          Size            =   18
  604.          Charset         =   0
  605.          Weight          =   700
  606.          Underline       =   0   'False
  607.          Italic          =   0   'False
  608.          Strikethrough   =   0   'False
  609.       EndProperty
  610.       ForeColor       =   &H0000FF00&
  611.       Height          =   465
  612.       Left            =   360
  613.       MaxLength       =   18
  614.       MultiLine       =   -1  'True
  615.       TabIndex        =   0
  616.       TabStop         =   0   'False
  617.       Text            =   "Main.frx":383B
  618.       ToolTipText     =   "LCD Display"
  619.       Top             =   360
  620.       Width           =   4815
  621.    End
  622.    Begin VB.CommandButton Quit 
  623.       BackColor       =   &H00FFC0C0&
  624.       Caption         =   "OFF"
  625.       BeginProperty Font 
  626.          Name            =   "MS Sans Serif"
  627.          Size            =   8.25
  628.          Charset         =   0
  629.          Weight          =   700
  630.          Underline       =   0   'False
  631.          Italic          =   0   'False
  632.          Strikethrough   =   0   'False
  633.       EndProperty
  634.       Height          =   495
  635.       Left            =   4560
  636.       Style           =   1  'Graphical
  637.       TabIndex        =   25
  638.       ToolTipText     =   "Exit"
  639.       Top             =   3840
  640.       Width           =   735
  641.    End
  642.    Begin VB.CommandButton Number_squared 
  643.       BackColor       =   &H80000018&
  644.       Height          =   375
  645.       Left            =   3120
  646.       Picture         =   "Main.frx":383D
  647.       Style           =   1  'Graphical
  648.       TabIndex        =   24
  649.       ToolTipText     =   "Number squared"
  650.       Top             =   2160
  651.       Width           =   615
  652.    End
  653.    Begin VB.CommandButton Fraction 
  654.       BackColor       =   &H80000018&
  655.       Height          =   375
  656.       Left            =   2400
  657.       Picture         =   "Main.frx":411F
  658.       Style           =   1  'Graphical
  659.       TabIndex        =   23
  660.       ToolTipText     =   "Fraction"
  661.       Top             =   2160
  662.       Width           =   615
  663.    End
  664.    Begin VB.CommandButton Mode 
  665.       BackColor       =   &H0000FFFF&
  666.       Caption         =   "MODE"
  667.       Height          =   375
  668.       Left            =   120
  669.       Style           =   1  'Graphical
  670.       TabIndex        =   22
  671.       ToolTipText     =   "Mode"
  672.       Top             =   1680
  673.       Width           =   615
  674.    End
  675.    Begin VB.CommandButton Trig 
  676.       BackColor       =   &H80000018&
  677.       Caption         =   "tan"
  678.       BeginProperty Font 
  679.          Name            =   "MS Sans Serif"
  680.          Size            =   9.75
  681.          Charset         =   0
  682.          Weight          =   700
  683.          Underline       =   0   'False
  684.          Italic          =   0   'False
  685.          Strikethrough   =   0   'False
  686.       EndProperty
  687.       Height          =   375
  688.       Index           =   2
  689.       Left            =   2040
  690.       Style           =   1  'Graphical
  691.       TabIndex        =   21
  692.       ToolTipText     =   "Tangent"
  693.       Top             =   1680
  694.       Width           =   495
  695.    End
  696.    Begin VB.CommandButton Trig 
  697.       BackColor       =   &H80000018&
  698.       Caption         =   "cos"
  699.       BeginProperty Font 
  700.          Name            =   "MS Sans Serif"
  701.          Size            =   9.75
  702.          Charset         =   0
  703.          Weight          =   700
  704.          Underline       =   0   'False
  705.          Italic          =   0   'False
  706.          Strikethrough   =   0   'False
  707.       EndProperty
  708.       Height          =   375
  709.       Index           =   1
  710.       Left            =   1440
  711.       Style           =   1  'Graphical
  712.       TabIndex        =   20
  713.       ToolTipText     =   "Cosine"
  714.       Top             =   1680
  715.       Width           =   495
  716.    End
  717.    Begin VB.CommandButton Trig 
  718.       BackColor       =   &H80000018&
  719.       Caption         =   "sin"
  720.       BeginProperty Font 
  721.          Name            =   "MS Sans Serif"
  722.          Size            =   9.75
  723.          Charset         =   0
  724.          Weight          =   700
  725.          Underline       =   0   'False
  726.          Italic          =   0   'False
  727.          Strikethrough   =   0   'False
  728.       EndProperty
  729.       Height          =   375
  730.       Index           =   0
  731.       Left            =   840
  732.       Style           =   1  'Graphical
  733.       TabIndex        =   19
  734.       ToolTipText     =   "Sine"
  735.       Top             =   1680
  736.       Width           =   495
  737.    End
  738.    Begin VB.CommandButton N_root 
  739.       BackColor       =   &H80000018&
  740.       Height          =   375
  741.       Left            =   120
  742.       Picture         =   "Main.frx":4A01
  743.       Style           =   1  'Graphical
  744.       TabIndex        =   18
  745.       Tag             =   "N-RT"
  746.       ToolTipText     =   "N-root"
  747.       Top             =   2640
  748.       Width           =   615
  749.    End
  750.    Begin VB.CommandButton Arithmetic_operations 
  751.       Caption         =   "
  752.       BeginProperty Font 
  753.          Name            =   "MS Sans Serif"
  754.          Size            =   13.5
  755.          Charset         =   0
  756.          Weight          =   700
  757.          Underline       =   0   'False
  758.          Italic          =   0   'False
  759.          Strikethrough   =   0   'False
  760.       EndProperty
  761.       Height          =   495
  762.       Index           =   3
  763.       Left            =   3840
  764.       TabIndex        =   16
  765.       Top             =   4440
  766.       Width           =   495
  767.    End
  768.    Begin VB.CommandButton Arithmetic_operations 
  769.       Caption         =   "
  770.       BeginProperty Font 
  771.          Name            =   "MS Sans Serif"
  772.          Size            =   13.5
  773.          Charset         =   0
  774.          Weight          =   700
  775.          Underline       =   0   'False
  776.          Italic          =   0   'False
  777.          Strikethrough   =   0   'False
  778.       EndProperty
  779.       Height          =   495
  780.       Index           =   2
  781.       Left            =   3120
  782.       TabIndex        =   15
  783.       Top             =   4440
  784.       Width           =   495
  785.    End
  786.    Begin VB.CommandButton Arithmetic_operations 
  787.       BackColor       =   &H80000013&
  788.       Caption         =   "-"
  789.       BeginProperty Font 
  790.          Name            =   "MS Sans Serif"
  791.          Size            =   13.5
  792.          Charset         =   0
  793.          Weight          =   700
  794.          Underline       =   0   'False
  795.          Italic          =   0   'False
  796.          Strikethrough   =   0   'False
  797.       EndProperty
  798.       Height          =   495
  799.       Index           =   1
  800.       Left            =   3840
  801.       MaskColor       =   &H00FFFFFF&
  802.       Style           =   1  'Graphical
  803.       TabIndex        =   14
  804.       Top             =   3840
  805.       UseMaskColor    =   -1  'True
  806.       Width           =   495
  807.    End
  808.    Begin VB.CommandButton Arithmetic_operations 
  809.       Caption         =   "+"
  810.       BeginProperty Font 
  811.          Name            =   "MS Sans Serif"
  812.          Size            =   13.5
  813.          Charset         =   0
  814.          Weight          =   700
  815.          Underline       =   0   'False
  816.          Italic          =   0   'False
  817.          Strikethrough   =   0   'False
  818.       EndProperty
  819.       Height          =   495
  820.       Index           =   0
  821.       Left            =   3120
  822.       TabIndex        =   13
  823.       Top             =   3840
  824.       Width           =   495
  825.    End
  826.    Begin VB.CommandButton Clear 
  827.       BackColor       =   &H000000FF&
  828.       Caption         =   "CA"
  829.       BeginProperty Font 
  830.          Name            =   "MS Sans Serif"
  831.          Size            =   12
  832.          Charset         =   0
  833.          Weight          =   700
  834.          Underline       =   0   'False
  835.          Italic          =   0   'False
  836.          Strikethrough   =   0   'False
  837.       EndProperty
  838.       Height          =   495
  839.       Left            =   120
  840.       MaskColor       =   &H00FFFFFF&
  841.       Style           =   1  'Graphical
  842.       TabIndex        =   12
  843.       ToolTipText     =   "Clear all"
  844.       Top             =   3840
  845.       Width           =   495
  846.    End
  847.    Begin VB.CommandButton Decimal_point 
  848.       Caption         =   "."
  849.       BeginProperty Font 
  850.          Name            =   "MS Sans Serif"
  851.          Size            =   13.5
  852.          Charset         =   0
  853.          Weight          =   700
  854.          Underline       =   0   'False
  855.          Italic          =   0   'False
  856.          Strikethrough   =   0   'False
  857.       EndProperty
  858.       Height          =   495
  859.       Left            =   2280
  860.       TabIndex        =   11
  861.       Top             =   5040
  862.       Width           =   495
  863.    End
  864.    Begin VB.CommandButton Number 
  865.       Caption         =   "0"
  866.       BeginProperty Font 
  867.          Name            =   "MS Sans Serif"
  868.          Size            =   12
  869.          Charset         =   0
  870.          Weight          =   700
  871.          Underline       =   0   'False
  872.          Italic          =   0   'False
  873.          Strikethrough   =   0   'False
  874.       EndProperty
  875.       Height          =   495
  876.       Index           =   9
  877.       Left            =   1560
  878.       TabIndex        =   10
  879.       Top             =   5040
  880.       Width           =   495
  881.    End
  882.    Begin VB.CommandButton Number 
  883.       Caption         =   "9"
  884.       BeginProperty Font 
  885.          Name            =   "MS Sans Serif"
  886.          Size            =   12
  887.          Charset         =   0
  888.          Weight          =   700
  889.          Underline       =   0   'False
  890.          Italic          =   0   'False
  891.          Strikethrough   =   0   'False
  892.       EndProperty
  893.       Height          =   495
  894.       Index           =   8
  895.       Left            =   840
  896.       TabIndex        =   9
  897.       Top             =   5040
  898.       Width           =   495
  899.    End
  900.    Begin VB.CommandButton Number 
  901.       Caption         =   "8"
  902.       BeginProperty Font 
  903.          Name            =   "MS Sans Serif"
  904.          Size            =   12
  905.          Charset         =   0
  906.          Weight          =   700
  907.          Underline       =   0   'False
  908.          Italic          =   0   'False
  909.          Strikethrough   =   0   'False
  910.       EndProperty
  911.       Height          =   495
  912.       Index           =   7
  913.       Left            =   120
  914.       MaskColor       =   &H00E0E0E0&
  915.       TabIndex        =   8
  916.       Top             =   5040
  917.       Width           =   495
  918.    End
  919.    Begin VB.CommandButton Number 
  920.       Caption         =   "7"
  921.       BeginProperty Font 
  922.          Name            =   "MS Sans Serif"
  923.          Size            =   12
  924.          Charset         =   0
  925.          Weight          =   700
  926.          Underline       =   0   'False
  927.          Italic          =   0   'False
  928.          Strikethrough   =   0   'False
  929.       EndProperty
  930.       Height          =   495
  931.       Index           =   6
  932.       Left            =   2280
  933.       MaskColor       =   &H00E0E0E0&
  934.       TabIndex        =   7
  935.       Top             =   4440
  936.       Width           =   495
  937.    End
  938.    Begin VB.CommandButton Number 
  939.       Caption         =   "6"
  940.       BeginProperty Font 
  941.          Name            =   "MS Sans Serif"
  942.          Size            =   12
  943.          Charset         =   0
  944.          Weight          =   700
  945.          Underline       =   0   'False
  946.          Italic          =   0   'False
  947.          Strikethrough   =   0   'False
  948.       EndProperty
  949.       Height          =   495
  950.       Index           =   5
  951.       Left            =   1560
  952.       MaskColor       =   &H00E0E0E0&
  953.       TabIndex        =   6
  954.       Top             =   4440
  955.       Width           =   495
  956.    End
  957.    Begin VB.CommandButton Number 
  958.       Caption         =   "5"
  959.       BeginProperty Font 
  960.          Name            =   "MS Sans Serif"
  961.          Size            =   12
  962.          Charset         =   0
  963.          Weight          =   700
  964.          Underline       =   0   'False
  965.          Italic          =   0   'False
  966.          Strikethrough   =   0   'False
  967.       EndProperty
  968.       Height          =   495
  969.       Index           =   4
  970.       Left            =   840
  971.       MaskColor       =   &H00E0E0E0&
  972.       TabIndex        =   5
  973.       Top             =   4440
  974.       Width           =   495
  975.    End
  976.    Begin VB.CommandButton Number 
  977.       Caption         =   "4"
  978.       BeginProperty Font 
  979.          Name            =   "MS Sans Serif"
  980.          Size            =   12
  981.          Charset         =   0
  982.          Weight          =   700
  983.          Underline       =   0   'False
  984.          Italic          =   0   'False
  985.          Strikethrough   =   0   'False
  986.       EndProperty
  987.       Height          =   495
  988.       Index           =   3
  989.       Left            =   120
  990.       MaskColor       =   &H00E0E0E0&
  991.       TabIndex        =   4
  992.       Top             =   4440
  993.       Width           =   495
  994.    End
  995.    Begin VB.CommandButton Number 
  996.       Caption         =   "3"
  997.       BeginProperty Font 
  998.          Name            =   "MS Sans Serif"
  999.          Size            =   12
  1000.          Charset         =   0
  1001.          Weight          =   700
  1002.          Underline       =   0   'False
  1003.          Italic          =   0   'False
  1004.          Strikethrough   =   0   'False
  1005.       EndProperty
  1006.       Height          =   495
  1007.       Index           =   2
  1008.       Left            =   2280
  1009.       MaskColor       =   &H00E0E0E0&
  1010.       Style           =   1  'Graphical
  1011.       TabIndex        =   3
  1012.       Top             =   3840
  1013.       Width           =   495
  1014.    End
  1015.    Begin VB.CommandButton Number 
  1016.       Caption         =   "2"
  1017.       BeginProperty Font 
  1018.          Name            =   "MS Sans Serif"
  1019.          Size            =   12
  1020.          Charset         =   0
  1021.          Weight          =   700
  1022.          Underline       =   0   'False
  1023.          Italic          =   0   'False
  1024.          Strikethrough   =   0   'False
  1025.       EndProperty
  1026.       Height          =   495
  1027.       Index           =   1
  1028.       Left            =   1560
  1029.       MaskColor       =   &H00E0E0E0&
  1030.       TabIndex        =   2
  1031.       Top             =   3840
  1032.       Width           =   495
  1033.    End
  1034.    Begin VB.CommandButton Number 
  1035.       Caption         =   "1"
  1036.       BeginProperty Font 
  1037.          Name            =   "MS Sans Serif"
  1038.          Size            =   12
  1039.          Charset         =   0
  1040.          Weight          =   700
  1041.          Underline       =   0   'False
  1042.          Italic          =   0   'False
  1043.          Strikethrough   =   0   'False
  1044.       EndProperty
  1045.       Height          =   495
  1046.       Index           =   0
  1047.       Left            =   840
  1048.       MaskColor       =   &H00E0E0E0&
  1049.       TabIndex        =   1
  1050.       Top             =   3840
  1051.       Width           =   495
  1052.    End
  1053.    Begin VB.CommandButton Square_root 
  1054.       BackColor       =   &H80000018&
  1055.       Height          =   375
  1056.       Left            =   4680
  1057.       Picture         =   "Main.frx":5583
  1058.       Style           =   1  'Graphical
  1059.       TabIndex        =   17
  1060.       Tag             =   "SQRT"
  1061.       ToolTipText     =   "Square root"
  1062.       Top             =   2160
  1063.       Width           =   615
  1064.    End
  1065.    Begin VB.TextBox LCD 
  1066.       BackColor       =   &H80000006&
  1067.       ForeColor       =   &H0000FF00&
  1068.       Height          =   975
  1069.       Left            =   120
  1070.       TabIndex        =   26
  1071.       Top             =   120
  1072.       Width           =   5175
  1073.    End
  1074.    Begin VB.Label Label4 
  1075.       Alignment       =   2  'Center
  1076.       BackColor       =   &H008080FF&
  1077.       Caption         =   "4- SD"
  1078.       Height          =   255
  1079.       Left            =   3120
  1080.       TabIndex        =   61
  1081.       Top             =   1200
  1082.       Width           =   615
  1083.    End
  1084.    Begin VB.Label Label3 
  1085.       Alignment       =   2  'Center
  1086.       BackColor       =   &H00FFFFC0&
  1087.       Caption         =   "3- Rad"
  1088.       Height          =   255
  1089.       Left            =   2400
  1090.       TabIndex        =   60
  1091.       Top             =   1200
  1092.       Width           =   735
  1093.    End
  1094.    Begin VB.Label Label2 
  1095.       Alignment       =   2  'Center
  1096.       BackColor       =   &H00C0FFC0&
  1097.       Caption         =   "2- Deg"
  1098.       Height          =   255
  1099.       Left            =   1680
  1100.       TabIndex        =   59
  1101.       Top             =   1200
  1102.       Width           =   735
  1103.    End
  1104.    Begin VB.Label Label1 
  1105.       Alignment       =   2  'Center
  1106.       BackColor       =   &H00C0C0FF&
  1107.       Caption         =   "1-  Comp"
  1108.       Height          =   255
  1109.       Left            =   840
  1110.       TabIndex        =   58
  1111.       Top             =   1200
  1112.       Width           =   855
  1113.    End
  1114.    Begin VB.Line Line1 
  1115.       BorderColor     =   &H80000009&
  1116.       X1              =   2880
  1117.       X2              =   2880
  1118.       Y1              =   3600
  1119.       Y2              =   5760
  1120.    End
  1121.    Begin VB.Label Modes 
  1122.       Alignment       =   2  'Center
  1123.       BackColor       =   &H00C0FFFF&
  1124.       Caption         =   "Modes:"
  1125.       Height          =   255
  1126.       Left            =   120
  1127.       TabIndex        =   57
  1128.       Top             =   1200
  1129.       Width           =   735
  1130.    End
  1131.    Begin VB.Line Border2 
  1132.       BorderColor     =   &H80000009&
  1133.       X1              =   0
  1134.       X2              =   5400
  1135.       Y1              =   3600
  1136.       Y2              =   3600
  1137.    End
  1138.    Begin VB.Line Border1 
  1139.       BorderColor     =   &H80000009&
  1140.       X1              =   0
  1141.       X2              =   5400
  1142.       Y1              =   1560
  1143.       Y2              =   1560
  1144.    End
  1145.    Begin VB.Label Label6 
  1146.       Alignment       =   2  'Center
  1147.       BackColor       =   &H8000000C&
  1148.       Caption         =   "fx-35A"
  1149.       BeginProperty Font 
  1150.          Name            =   "Times New Roman"
  1151.          Size            =   12.75
  1152.          Charset         =   0
  1153.          Weight          =   700
  1154.          Underline       =   0   'False
  1155.          Italic          =   -1  'True
  1156.          Strikethrough   =   0   'False
  1157.       EndProperty
  1158.       ForeColor       =   &H0080FFFF&
  1159.       Height          =   375
  1160.       Left            =   3840
  1161.       TabIndex        =   62
  1162.       Top             =   1200
  1163.       Width           =   1455
  1164.    End
  1165. Attribute VB_Name = "frmMain"
  1166. Attribute VB_GlobalNameSpace = False
  1167. Attribute VB_Creatable = False
  1168. Attribute VB_PredeclaredId = True
  1169. Attribute VB_Exposed = False
  1170. Option Explicit
  1171. '''''''''''''''''''''''''''''''''''''''''''''''''''''''
  1172. ' Sorry, I also couldn't come up with a good solution '
  1173. ' to fractions (a/b/c button), so I left it out. If   '
  1174. ' anyone has a good solution to this module as well   '
  1175. ' as all the other modules, please send it to me at   '
  1176. ' foxdetective007@mailcity.com                        '
  1177. '''''''''''''''''''''''''''''''''''''''''''''''''''''''
  1178. Dim Argument As Double
  1179. Private Sub Arithmetic_operations_Click(Index As Integer)
  1180.     Dot = False
  1181.     Sign = True
  1182.     Misc.Minus = False
  1183.     frmMain.Function.Text = ""
  1184.     Call Misc.Exponential_validation
  1185.     Operation = Arithmetic_operations(Index).Caption
  1186. End Sub
  1187. Private Sub Change_sign_Click()
  1188.     If Misc.Exponent = False Then
  1189.         Call Misc.Change_sign
  1190.     ElseIf Misc.Exponent = True Then
  1191.         Call Misc.Change_exponential_sign
  1192.     End If
  1193. End Sub
  1194. Private Sub Clear_Click()
  1195.             
  1196.     Misc.Exponent = False
  1197.     Sign = False
  1198.     Call Misc.Reset
  1199.     frmMain.Exp.Text = "00"
  1200.     frmMain.Exp.Visible = False
  1201.     Base = 0
  1202.     Power = 0
  1203.     Initial_length = 0
  1204.     New_dot_position = 0
  1205. End Sub
  1206. Private Sub Clear_s_r_Click()
  1207.     Call Statistical_functions.Clear_s_r
  1208. End Sub
  1209. Private Sub Decimal_point_Click()
  1210. 'If decimal point is allowed as soon as pressed, lock it
  1211.     If Dot = False Then
  1212.         Number_space.Text = Number_space.Text & "."
  1213.     ElseIf Dot = True Then
  1214.     End If
  1215.     Dot = True  'decimal point is locked
  1216.         
  1217.     Misc.Whole_portion = Len(Number_space.Text) - 1
  1218. End Sub
  1219. Private Sub E_Click()
  1220.     Number_space.Text = "2.71828182846"
  1221. End Sub
  1222. Private Sub Equals_Click()
  1223. On Error GoTo solution
  1224.     Percentage_indicator.Text = ""
  1225.     Call Equal_operation.Equals
  1226.     Exit Sub
  1227. solution:
  1228.     If Err.Number = 6 Then
  1229.         Number_space.Text = "-OVERFLOW ERROR-"
  1230.         MsgBox "The value will be too large or too small.Try another calculation." _
  1231.         , vbCritical + vbOKOnly, "Error"
  1232.         Number_space.Text = "0"
  1233.     Else
  1234.         Call Misc.solution
  1235.     End If
  1236. End Sub
  1237. Private Sub Form_Load()
  1238.     Call Misc.Reset
  1239.     Exp.Text = "00"
  1240.     Memory_indicator.Text = " "
  1241.     Exp.Visible = False
  1242.     Mode_type.Text = "DEG"
  1243.     Memory_register = 0
  1244.     Clear_s_r = False
  1245.     Exponential_minus = False
  1246.     Misc.x = 0
  1247.     Misc.Loop_counter = 0
  1248.     Memory_indicator.Visible = False
  1249.     Statistics_mode.Visible = False
  1250.     Exponential_value1 = " "
  1251.     Exponential_value2 = " "
  1252. End Sub
  1253. Private Sub Fraction_Click()
  1254.     MsgBox "Sorry, fractions do not work.", vbCritical + vbOKOnly, _
  1255.     "Error"
  1256. End Sub
  1257. Private Sub Ln_Click()
  1258. On Error GoTo solution
  1259.     Base = CDbl(Number_space.Text)
  1260.     If Base = 0 Then
  1261.         Number_space.Text = "-ERROR-"
  1262.         MsgBox "There is no natural logaritm of 0.", vbCritical + vbOKOnly, _
  1263.         "Error"
  1264.         Number_space.Text = 0
  1265.     ElseIf Base < 0 Then
  1266.         Number_space.Text = "-ERROR-"
  1267.         MsgBox "There is no natural logaritm of negative base." _
  1268.         , vbCritical + vbOKOnly, "Error"
  1269.         Number_space.Text = "0"
  1270.     Else
  1271.         If Sign = False Then
  1272.             Value1 = LgN(Base)
  1273.             Number_space.Text = Value1
  1274.             First_digit = False
  1275.         ElseIf Sign = True Then
  1276.             Value2 = LgN(Base)
  1277.             Number_space.Text = Value2
  1278.             First_digit = False
  1279.         End If
  1280.     End If
  1281.     Exit Sub
  1282. solution:
  1283.     Call Misc.solution
  1284. End Sub
  1285. Private Sub Log_Click()
  1286. On Error GoTo solution
  1287.     Base = CDbl(Number_space.Text)
  1288.     If Base = 0 Then
  1289.         Number_space.Text = "-ERROR-"
  1290.         MsgBox "There is no common logaritm of 0.", vbCritical + vbOKOnly, _
  1291.         "Error"
  1292.         Number_space.Text = 0
  1293.     ElseIf Base < 0 Then
  1294.         Number_space.Text = "-ERROR-"
  1295.         MsgBox "There is no common logaritm of negative base." _
  1296.         , vbCritical + vbOKOnly, "Error"
  1297.         Number_space.Text = "0"
  1298.     Else
  1299.         If Sign = False Then
  1300.             Value1 = LogN(Base, 10)
  1301.             Number_space.Text = Value1
  1302.             First_digit = False
  1303.         ElseIf Sign = True Then
  1304.             Value2 = LogN(Base, 10)
  1305.             Number_space.Text = Value2
  1306.             First_digit = False
  1307.         End If
  1308.     End If
  1309.     Exit Sub
  1310. solution:
  1311.     Call Misc.solution
  1312. End Sub
  1313. Private Sub Mean_Click()
  1314. If Statistic_score.Visible = True Then
  1315.     Call Statistical_functions.Mean
  1316. End If
  1317. End Sub
  1318. Private Sub Memory_clear_Click()
  1319. Dim Response As String
  1320.     Response = MsgBox("Are you sure you want to clear the memory?" _
  1321.     , vbExclamation + vbYesNo, "Clear memory?")
  1322.     If Response = vbNo Then
  1323.     ElseIf Response = vbYes Then
  1324.         Memory_register = 0
  1325.         Memory_indicator.Text = ""
  1326.         Number_space.Text = "0"
  1327.     End If
  1328. End Sub
  1329. Private Sub Memory_input_Click()
  1330.     Memory_indicator.Text = "Min"
  1331.     Memory_indicator.Visible = True
  1332.     Memory_register = CDbl(Number_space.Text)
  1333.     frmMain.Function.Text = ""
  1334.     Number_space.Text = "0"
  1335. End Sub
  1336. Private Sub Memory_recall_Click()
  1337.     Number_space.Text = Memory_register
  1338.     Sign = True
  1339. End Sub
  1340. Private Sub Mode_Click()
  1341. If Mode_value = False Then
  1342.     Mode_indicator = "M"
  1343.     Mode_value = True
  1344. ElseIf Mode_value = True Then
  1345.     Mode_indicator = ""
  1346.     Mode_value = False
  1347. End If
  1348. End Sub
  1349. Private Sub N_root_Click()
  1350.     Base = CDbl(Number_space.Text)
  1351.     Sign = True
  1352.     Misc.Minus = False
  1353.     Operation = N_root.Tag
  1354. End Sub
  1355. Private Sub Number_Click(Index As Integer)
  1356. If Mode_indicator.Text = "" Then
  1357.   If Misc.Exponent = False Then
  1358.     If Sign = True Then
  1359.         If First_digit = False Then
  1360.             Number_space.Text = " "
  1361.             If Exp.Visible = True Then
  1362.                 Exp.Visible = False
  1363.                 Exp.Text = ""
  1364.             End If
  1365.             First_digit = True
  1366.         End If
  1367.     End If
  1368.     If Number_space.Text = "0" Or Number_space.Text = " " Then
  1369.         Number_space.Text = Number(Index).Caption
  1370.     Else:
  1371.         Number_space.Text = Number_space.Text + Number(Index).Caption
  1372.     End If
  1373.   ElseIf Misc.Exponent = True Then
  1374.     If Sign = True Then
  1375.         If First_digit = False Then
  1376.             Exp.Text = " "
  1377.             First_digit = True
  1378.         End If
  1379.     End If
  1380.     If Exp.Text = "00" Or Exp.Text = " " Then
  1381.         Exp.Text = Number(Index).Caption
  1382.     Else:
  1383.         Exp.Text = Exp.Text + Number(Index).Caption
  1384.     End If
  1385.   End If
  1386.   'EXP.Text = ""
  1387. ElseIf Mode_indicator.Text = "M" Then
  1388.     Mode_number = Number(Index).Caption
  1389.     Call Modes_code.Mode_Validation
  1390. End If
  1391. End Sub
  1392. Private Sub Form_KeyPress(KeyAscii As Integer)
  1393. Dim Index1 As Integer
  1394. Dim Index2 As Integer
  1395. Select Case KeyAscii
  1396.     Case Asc("1")
  1397.         Index1 = 0
  1398.         Call Number_Click(Index1)
  1399.     Case Asc("2")
  1400.         Index1 = 1
  1401.         Call Number_Click(Index1)
  1402.     Case Asc("3")
  1403.         Index1 = 2
  1404.         Call Number_Click(Index1)
  1405.     Case Asc("4")
  1406.         Index1 = 3
  1407.         Call Number_Click(Index1)
  1408.     Case Asc("5")
  1409.         Index1 = 4
  1410.         Call Number_Click(Index1)
  1411.     Case Asc("6")
  1412.         Index1 = 5
  1413.         Call Number_Click(Index1)
  1414.     Case Asc("7")
  1415.         Index1 = 6
  1416.         Call Number_Click(Index1)
  1417.     Case Asc("8")
  1418.         Index1 = 7
  1419.         Call Number_Click(Index1)
  1420.     Case Asc("9")
  1421.         Index1 = 8
  1422.         Call Number_Click(Index1)
  1423.     Case Asc("0")
  1424.         Index1 = 9
  1425.         Call Number_Click(Index1)
  1426.     Case Asc(".")
  1427.         Call Decimal_point_Click
  1428.     Case Asc("-")
  1429.        Index2 = 1
  1430.        Call Arithmetic_operations_Click(Index2)
  1431.     Case Asc("+")
  1432.         Index2 = 0
  1433.         Call Arithmetic_operations_Click(Index2)
  1434.     Case Asc("*")
  1435.         Index2 = 2
  1436.         Call Arithmetic_operations_Click(Index2)
  1437.     Case Asc("/")
  1438.         Index2 = 3
  1439.         Call Arithmetic_operations_Click(Index2)
  1440.     Case Asc("=")
  1441.         Call Equal_operation.Equals
  1442.     Case Asc("%")
  1443.         Call Percentage_Click
  1444.     Case Asc("m")
  1445.         Call Mode_Click
  1446.     Case Asc("M")
  1447.         Call Mode_Click
  1448.     End Select
  1449. End Sub
  1450. Private Sub Number_squared_Click()
  1451. Dim Square As Double
  1452. On Error GoTo solution
  1453.     Square = CDbl(Number_space.Text) * CDbl(Number_space.Text)
  1454.     Number_space.Text = Square
  1455.     Exit Sub
  1456. solution:
  1457.     Call Misc.solution
  1458. End Sub
  1459. Private Sub Percentage_Click()
  1460.     Value2 = Number_space.Text
  1461.     Percentage_indicator.Text = "%"
  1462. End Sub
  1463. Private Sub PI_Click()
  1464.     Number_space.Text = "3.14159265359"
  1465. End Sub
  1466. Private Sub Population_standard_deviation_Click()
  1467.     Call Statistical_functions.Population_standard_deviation
  1468. End Sub
  1469. Private Sub Quit_Click()
  1470. Dim Response1 As String
  1471. Dim Response2 As String
  1472.     Response1 = MsgBox("Are you sure you want to quit?", vbExclamation + vbYesNo, "Quit")
  1473.     If Response1 = vbYes Then
  1474.         If Memory_indicator.Text = "Min" Then
  1475.         Response2 = MsgBox("If you quit now, the contents of the memory will be lost. Are you sure you want to quit?" _
  1476.         , vbExclamation + vbYesNo, "Memory")
  1477.             If Response2 = vbYes Then
  1478.                 Memory_indicator.Text = ""
  1479.                 Memory_register = 0
  1480.                 End
  1481.             Else:
  1482.                 frmMain.Refresh
  1483.             End If
  1484.         Else:
  1485.             End
  1486.         End If
  1487.         
  1488.     Else: frmMain.Refresh
  1489.     End If
  1490. End Sub
  1491. Private Sub Random_number_Click()
  1492.     Number_space.Text = Format(Rnd(), "0.############")
  1493. End Sub
  1494. Private Sub Reciprocal_Click()
  1495.     Call Misc.Reciprocal
  1496. End Sub
  1497. Private Sub Sample_standard_deviation_Click()
  1498.     Call Statistical_functions.Sample_standard_deviation
  1499. End Sub
  1500. Private Sub Scientific_notation_Click()
  1501.     Exp.Visible = True
  1502.     Exp.Text = "00"
  1503.     Misc.Exponent = True
  1504.     Exponential_minus = False
  1505. End Sub
  1506. Private Sub Square_root_Click()
  1507.     Call Misc.Square_root
  1508. End Sub
  1509. Private Sub Statistical_data_Click()
  1510.         
  1511.         Sign = True
  1512.         First_digit = False
  1513.         If Index > 20 Then
  1514.         
  1515.         ElseIf Index < 20 Then
  1516.             Index = Index + 1
  1517.         End If
  1518.         
  1519.         S_R(Index) = CDbl(Number_space.Text)
  1520.         Statistic_score.Text = "n" & Index
  1521.         Sign = True
  1522.         Dot = False
  1523.             
  1524. End Sub
  1525. Private Sub Sum_Click()
  1526.     Call Statistical_functions.Sum
  1527. End Sub
  1528. Private Sub Trig_Click(Index As Integer)
  1529. On Error GoTo solution
  1530.     Select Case Index
  1531.         
  1532.         Case "0"
  1533.             frmMain.Function.Text = "sin"
  1534.             Call Trig_functions.Sine_validation
  1535.         Case "1"
  1536.             frmMain.Function.Text = "cos"
  1537.             Call Trig_functions.Cosine_validation
  1538.         Case "2"
  1539.             frmMain.Function.Text = "tan"
  1540.             Call Trig_functions.Tangent_validation
  1541.         Case "3"
  1542.             frmMain.Function.Text = "cosec"
  1543.             Call Trig_functions.Cosecant_validation
  1544.         Case "4"
  1545.             frmMain.Function.Text = "sec"
  1546.             Call Trig_functions.Secant_validation
  1547.         Case "5"
  1548.             frmMain.Function.Text = "cot"
  1549.             Call Trig_functions.Cotangent_validation
  1550.         Case "6"
  1551.             frmMain.Function.Text = "arcsin"
  1552.             Call Trig_functions.Arcsine
  1553.         Case "7"
  1554.             frmMain.Function.Text = "arccos"
  1555.             Call Trig_functions.Arccosine
  1556.         Case "8"
  1557.             frmMain.Function.Text = "arctan"
  1558.             Call Trig_functions.Arctangent
  1559.     End Select
  1560. Exit Sub
  1561. solution:
  1562.     If Err.Number = "6" Then
  1563.         Number_space.Text = "-ERROR-"
  1564.         MsgBox "The value is too small or too large. Clear all and try again.", _
  1565.         vbCritical + vbOKOnly, "Error"
  1566.         Number_space.Text = "0"
  1567.         frmMain.Function.Text = ""
  1568.     Else
  1569.         Number_space.Text = "-ERROR-"
  1570.         MsgBox "An error has occurred in the calculation. Clear all and try again.", _
  1571.         vbCritical + vbOKOnly, "Error"
  1572.         Number_space.Text = "0"
  1573.         frmMain.Function.Text = ""
  1574.     End If
  1575. End Sub
  1576. Private Sub x_Power_Click()
  1577.     Base = CDbl(Number_space.Text)
  1578.     Misc.Minus = False
  1579.     Operation = x_Power.Tag
  1580.     Sign = True
  1581.     First_digit = False
  1582. End Sub
  1583.