home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 6 / mastvb6.iso / ch_code / ch20 / scicalc / scicalc.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-05-13  |  34.5 KB  |  1,061 lines

  1. VERSION 5.00
  2. Object = "{0E59F1D2-1FBE-11D0-8FF2-00A0D10038BC}#1.0#0"; "MSSCRIPT.OCX"
  3. Begin VB.Form CalculatorForm 
  4.    Appearance      =   0  'Flat
  5.    AutoRedraw      =   -1  'True
  6.    BackColor       =   &H00C0C0C0&
  7.    BorderStyle     =   3  'Fixed Dialog
  8.    Caption         =   "SciCALC 1.0 "
  9.    ClientHeight    =   4095
  10.    ClientLeft      =   1260
  11.    ClientTop       =   1065
  12.    ClientWidth     =   8040
  13.    BeginProperty Font 
  14.       Name            =   "MS Sans Serif"
  15.       Size            =   8.25
  16.       Charset         =   0
  17.       Weight          =   700
  18.       Underline       =   0   'False
  19.       Italic          =   0   'False
  20.       Strikethrough   =   0   'False
  21.    EndProperty
  22.    ForeColor       =   &H80000008&
  23.    Icon            =   "scicalc.frx":0000
  24.    LinkTopic       =   "Form1"
  25.    MaxButton       =   0   'False
  26.    MinButton       =   0   'False
  27.    PaletteMode     =   1  'UseZOrder
  28.    ScaleHeight     =   4095
  29.    ScaleWidth      =   8040
  30.    ShowInTaskbar   =   0   'False
  31.    WhatsThisButton =   -1  'True
  32.    WhatsThisHelp   =   -1  'True
  33.    Begin MSScriptControlCtl.ScriptControl ScriptControl1 
  34.       Left            =   120
  35.       Top             =   480
  36.       _ExtentX        =   1005
  37.       _ExtentY        =   1005
  38.       AllowUI         =   -1  'True
  39.    End
  40.    Begin VB.CommandButton LogBttn 
  41.       Caption         =   "Show  Log"
  42.       BeginProperty Font 
  43.          Name            =   "Verdana"
  44.          Size            =   9.75
  45.          Charset         =   0
  46.          Weight          =   400
  47.          Underline       =   0   'False
  48.          Italic          =   0   'False
  49.          Strikethrough   =   0   'False
  50.       EndProperty
  51.       Height          =   495
  52.       Left            =   6495
  53.       TabIndex        =   50
  54.       Top             =   2760
  55.       Width           =   1365
  56.    End
  57.    Begin VB.CommandButton MemoryRecall 
  58.       Caption         =   "MR"
  59.       BeginProperty Font 
  60.          Name            =   "Verdana"
  61.          Size            =   9.75
  62.          Charset         =   0
  63.          Weight          =   400
  64.          Underline       =   0   'False
  65.          Italic          =   0   'False
  66.          Strikethrough   =   0   'False
  67.       EndProperty
  68.       Height          =   330
  69.       Left            =   5880
  70.       TabIndex        =   46
  71.       Top             =   1080
  72.       Width           =   540
  73.    End
  74.    Begin VB.CommandButton MemoryMinus 
  75.       Caption         =   "M-"
  76.       BeginProperty Font 
  77.          Name            =   "Verdana"
  78.          Size            =   9.75
  79.          Charset         =   0
  80.          Weight          =   400
  81.          Underline       =   0   'False
  82.          Italic          =   0   'False
  83.          Strikethrough   =   0   'False
  84.       EndProperty
  85.       Height          =   330
  86.       Left            =   7320
  87.       TabIndex        =   45
  88.       Top             =   1080
  89.       Width           =   540
  90.    End
  91.    Begin VB.CommandButton MemoryPlus 
  92.       Caption         =   "M+"
  93.       BeginProperty Font 
  94.          Name            =   "Verdana"
  95.          Size            =   9.75
  96.          Charset         =   0
  97.          Weight          =   400
  98.          Underline       =   0   'False
  99.          Italic          =   0   'False
  100.          Strikethrough   =   0   'False
  101.       EndProperty
  102.       Height          =   330
  103.       Left            =   6600
  104.       TabIndex        =   44
  105.       Top             =   1080
  106.       Width           =   540
  107.    End
  108.    Begin VB.CommandButton CLRButton 
  109.       Caption         =   "CLR"
  110.       BeginProperty Font 
  111.          Name            =   "Verdana"
  112.          Size            =   9.75
  113.          Charset         =   0
  114.          Weight          =   400
  115.          Underline       =   0   'False
  116.          Italic          =   0   'False
  117.          Strikethrough   =   0   'False
  118.       EndProperty
  119.       Height          =   330
  120.       Left            =   7320
  121.       TabIndex        =   43
  122.       Top             =   120
  123.       Width           =   540
  124.    End
  125.    Begin VB.CommandButton BSButton 
  126.       Caption         =   "BS"
  127.       BeginProperty Font 
  128.          Name            =   "Verdana"
  129.          Size            =   9.75
  130.          Charset         =   0
  131.          Weight          =   400
  132.          Underline       =   0   'False
  133.          Italic          =   0   'False
  134.          Strikethrough   =   0   'False
  135.       EndProperty
  136.       Height          =   330
  137.       Left            =   6600
  138.       TabIndex        =   42
  139.       Top             =   120
  140.       Width           =   540
  141.    End
  142.    Begin VB.CommandButton DelButton 
  143.       Caption         =   "Del"
  144.       BeginProperty Font 
  145.          Name            =   "Verdana"
  146.          Size            =   9.75
  147.          Charset         =   0
  148.          Weight          =   400
  149.          Underline       =   0   'False
  150.          Italic          =   0   'False
  151.          Strikethrough   =   0   'False
  152.       EndProperty
  153.       Height          =   330
  154.       Left            =   5880
  155.       TabIndex        =   41
  156.       Top             =   120
  157.       Width           =   540
  158.    End
  159.    Begin VB.CommandButton Command2 
  160.       Caption         =   "?"
  161.       BeginProperty Font 
  162.          Name            =   "MS Serif"
  163.          Size            =   18
  164.          Charset         =   0
  165.          Weight          =   700
  166.          Underline       =   0   'False
  167.          Italic          =   0   'False
  168.          Strikethrough   =   0   'False
  169.       EndProperty
  170.       Height          =   495
  171.       Left            =   6495
  172.       TabIndex        =   3
  173.       Top             =   3435
  174.       Width           =   1365
  175.    End
  176.    Begin VB.TextBox Text1 
  177.       BackColor       =   &H00FFFF00&
  178.       BeginProperty Font 
  179.          Name            =   "Verdana"
  180.          Size            =   9.75
  181.          Charset         =   0
  182.          Weight          =   400
  183.          Underline       =   0   'False
  184.          Italic          =   0   'False
  185.          Strikethrough   =   0   'False
  186.       EndProperty
  187.       ForeColor       =   &H00000080&
  188.       Height          =   810
  189.       HideSelection   =   0   'False
  190.       Left            =   1560
  191.       MultiLine       =   -1  'True
  192.       ScrollBars      =   2  'Vertical
  193.       TabIndex        =   0
  194.       Text            =   "scicalc.frx":000C
  195.       Top             =   105
  196.       Width           =   4140
  197.    End
  198.    Begin VB.CommandButton Command1 
  199.       Appearance      =   0  'Flat
  200.       BackColor       =   &H80000005&
  201.       Caption         =   "&Calculate"
  202.       Default         =   -1  'True
  203.       BeginProperty Font 
  204.          Name            =   "Verdana"
  205.          Size            =   9
  206.          Charset         =   0
  207.          Weight          =   400
  208.          Underline       =   0   'False
  209.          Italic          =   0   'False
  210.          Strikethrough   =   0   'False
  211.       EndProperty
  212.       Height          =   330
  213.       Left            =   135
  214.       TabIndex        =   2
  215.       Top             =   1590
  216.       Width           =   1260
  217.    End
  218.    Begin VB.Frame Frame1 
  219.       BackColor       =   &H00C0C0C0&
  220.       Height          =   1920
  221.       Left            =   90
  222.       TabIndex        =   4
  223.       Top             =   2040
  224.       Width           =   1785
  225.       Begin VB.CommandButton NumPeriod 
  226.          Caption         =   "."
  227.          BeginProperty Font 
  228.             Name            =   "Verdana"
  229.             Size            =   9.75
  230.             Charset         =   0
  231.             Weight          =   400
  232.             Underline       =   0   'False
  233.             Italic          =   0   'False
  234.             Strikethrough   =   0   'False
  235.          EndProperty
  236.          Height          =   320
  237.          Left            =   1200
  238.          TabIndex        =   29
  239.          Top             =   1440
  240.          Width           =   460
  241.       End
  242.       Begin VB.CommandButton Num 
  243.          Caption         =   "0"
  244.          BeginProperty Font 
  245.             Name            =   "Verdana"
  246.             Size            =   9.75
  247.             Charset         =   0
  248.             Weight          =   400
  249.             Underline       =   0   'False
  250.             Italic          =   0   'False
  251.             Strikethrough   =   0   'False
  252.          EndProperty
  253.          Height          =   320
  254.          Index           =   0
  255.          Left            =   660
  256.          TabIndex        =   28
  257.          Top             =   1440
  258.          Width           =   460
  259.       End
  260.       Begin VB.CommandButton Num 
  261.          Caption         =   "9"
  262.          BeginProperty Font 
  263.             Name            =   "Verdana"
  264.             Size            =   9.75
  265.             Charset         =   0
  266.             Weight          =   400
  267.             Underline       =   0   'False
  268.             Italic          =   0   'False
  269.             Strikethrough   =   0   'False
  270.          EndProperty
  271.          Height          =   315
  272.          Index           =   9
  273.          Left            =   1200
  274.          TabIndex        =   27
  275.          Top             =   255
  276.          WhatsThisHelpID =   1
  277.          Width           =   465
  278.       End
  279.       Begin VB.CommandButton Num 
  280.          Caption         =   "8"
  281.          BeginProperty Font 
  282.             Name            =   "Verdana"
  283.             Size            =   9.75
  284.             Charset         =   0
  285.             Weight          =   400
  286.             Underline       =   0   'False
  287.             Italic          =   0   'False
  288.             Strikethrough   =   0   'False
  289.          EndProperty
  290.          Height          =   320
  291.          Index           =   8
  292.          Left            =   660
  293.          TabIndex        =   26
  294.          Top             =   255
  295.          Width           =   460
  296.       End
  297.       Begin VB.CommandButton Num 
  298.          Caption         =   "7"
  299.          BeginProperty Font 
  300.             Name            =   "Verdana"
  301.             Size            =   9.75
  302.             Charset         =   0
  303.             Weight          =   400
  304.             Underline       =   0   'False
  305.             Italic          =   0   'False
  306.             Strikethrough   =   0   'False
  307.          EndProperty
  308.          Height          =   315
  309.          Index           =   7
  310.          Left            =   135
  311.          TabIndex        =   25
  312.          Top             =   255
  313.          Width           =   465
  314.       End
  315.       Begin VB.CommandButton Num 
  316.          Caption         =   "6"
  317.          BeginProperty Font 
  318.             Name            =   "Verdana"
  319.             Size            =   9.75
  320.             Charset         =   0
  321.             Weight          =   400
  322.             Underline       =   0   'False
  323.             Italic          =   0   'False
  324.             Strikethrough   =   0   'False
  325.          EndProperty
  326.          Height          =   320
  327.          Index           =   6
  328.          Left            =   135
  329.          TabIndex        =   24
  330.          Top             =   645
  331.          Width           =   460
  332.       End
  333.       Begin VB.CommandButton Num 
  334.          Caption         =   "5"
  335.          BeginProperty Font 
  336.             Name            =   "Verdana"
  337.             Size            =   9.75
  338.             Charset         =   0
  339.             Weight          =   400
  340.             Underline       =   0   'False
  341.             Italic          =   0   'False
  342.             Strikethrough   =   0   'False
  343.          EndProperty
  344.          Height          =   320
  345.          Index           =   5
  346.          Left            =   660
  347.          TabIndex        =   23
  348.          Top             =   645
  349.          Width           =   460
  350.       End
  351.       Begin VB.CommandButton Num 
  352.          Caption         =   "4"
  353.          BeginProperty Font 
  354.             Name            =   "Verdana"
  355.             Size            =   9.75
  356.             Charset         =   0
  357.             Weight          =   400
  358.             Underline       =   0   'False
  359.             Italic          =   0   'False
  360.             Strikethrough   =   0   'False
  361.          EndProperty
  362.          Height          =   320
  363.          Index           =   4
  364.          Left            =   1200
  365.          TabIndex        =   22
  366.          Top             =   645
  367.          Width           =   460
  368.       End
  369.       Begin VB.CommandButton Num 
  370.          Caption         =   "3"
  371.          BeginProperty Font 
  372.             Name            =   "Verdana"
  373.             Size            =   9.75
  374.             Charset         =   0
  375.             Weight          =   400
  376.             Underline       =   0   'False
  377.             Italic          =   0   'False
  378.             Strikethrough   =   0   'False
  379.          EndProperty
  380.          Height          =   320
  381.          Index           =   3
  382.          Left            =   1200
  383.          TabIndex        =   21
  384.          Top             =   1050
  385.          Width           =   460
  386.       End
  387.       Begin VB.CommandButton Num 
  388.          Caption         =   "2"
  389.          BeginProperty Font 
  390.             Name            =   "Verdana"
  391.             Size            =   9.75
  392.             Charset         =   0
  393.             Weight          =   400
  394.             Underline       =   0   'False
  395.             Italic          =   0   'False
  396.             Strikethrough   =   0   'False
  397.          EndProperty
  398.          Height          =   320
  399.          Index           =   2
  400.          Left            =   660
  401.          TabIndex        =   20
  402.          Top             =   1050
  403.          Width           =   460
  404.       End
  405.       Begin VB.CommandButton Num 
  406.          Caption         =   "1"
  407.          BeginProperty Font 
  408.             Name            =   "Verdana"
  409.             Size            =   9.75
  410.             Charset         =   0
  411.             Weight          =   400
  412.             Underline       =   0   'False
  413.             Italic          =   0   'False
  414.             Strikethrough   =   0   'False
  415.          EndProperty
  416.          Height          =   320
  417.          Index           =   1
  418.          Left            =   135
  419.          TabIndex        =   19
  420.          Top             =   1050
  421.          Width           =   460
  422.       End
  423.    End
  424.    Begin VB.Frame Frame2 
  425.       Height          =   1920
  426.       Left            =   1995
  427.       TabIndex        =   5
  428.       Top             =   2040
  429.       Width           =   1785
  430.       Begin VB.CommandButton Operator 
  431.          Caption         =   "+"
  432.          BeginProperty Font 
  433.             Name            =   "Verdana"
  434.             Size            =   11.25
  435.             Charset         =   0
  436.             Weight          =   400
  437.             Underline       =   0   'False
  438.             Italic          =   0   'False
  439.             Strikethrough   =   0   'False
  440.          EndProperty
  441.          Height          =   315
  442.          Index           =   0
  443.          Left            =   120
  444.          TabIndex        =   49
  445.          Top             =   225
  446.          Width           =   465
  447.       End
  448.       Begin VB.CommandButton Operator 
  449.          Caption         =   "-"
  450.          BeginProperty Font 
  451.             Name            =   "Verdana"
  452.             Size            =   11.25
  453.             Charset         =   0
  454.             Weight          =   400
  455.             Underline       =   0   'False
  456.             Italic          =   0   'False
  457.             Strikethrough   =   0   'False
  458.          EndProperty
  459.          Height          =   320
  460.          Index           =   1
  461.          Left            =   645
  462.          TabIndex        =   48
  463.          Top             =   225
  464.          Width           =   460
  465.       End
  466.       Begin VB.CommandButton Operator 
  467.          Caption         =   "("
  468.          BeginProperty Font 
  469.             Name            =   "Verdana"
  470.             Size            =   9.75
  471.             Charset         =   0
  472.             Weight          =   400
  473.             Underline       =   0   'False
  474.             Italic          =   0   'False
  475.             Strikethrough   =   0   'False
  476.          EndProperty
  477.          Height          =   320
  478.          Index           =   2
  479.          Left            =   1185
  480.          TabIndex        =   47
  481.          Top             =   225
  482.          Width           =   460
  483.       End
  484.       Begin VB.CommandButton Operator 
  485.          Caption         =   "^"
  486.          BeginProperty Font 
  487.             Name            =   "Verdana"
  488.             Size            =   9.75
  489.             Charset         =   0
  490.             Weight          =   400
  491.             Underline       =   0   'False
  492.             Italic          =   0   'False
  493.             Strikethrough   =   0   'False
  494.          EndProperty
  495.          Height          =   320
  496.          Index           =   8
  497.          Left            =   1185
  498.          TabIndex        =   18
  499.          Top             =   1065
  500.          Width           =   460
  501.       End
  502.       Begin VB.CommandButton Operator 
  503.          Caption         =   ")"
  504.          BeginProperty Font 
  505.             Name            =   "Verdana"
  506.             Size            =   9.75
  507.             Charset         =   0
  508.             Weight          =   400
  509.             Underline       =   0   'False
  510.             Italic          =   0   'False
  511.             Strikethrough   =   0   'False
  512.          EndProperty
  513.          Height          =   320
  514.          Index           =   5
  515.          Left            =   1185
  516.          TabIndex        =   17
  517.          Top             =   645
  518.          Width           =   460
  519.       End
  520.       Begin VB.CommandButton Operator 
  521.          Caption         =   "X"
  522.          BeginProperty Font 
  523.             Name            =   "MS Serif"
  524.             Size            =   9.75
  525.             Charset         =   0
  526.             Weight          =   700
  527.             Underline       =   0   'False
  528.             Italic          =   0   'False
  529.             Strikethrough   =   0   'False
  530.          EndProperty
  531.          Height          =   320
  532.          Index           =   9
  533.          Left            =   1185
  534.          TabIndex        =   16
  535.          Top             =   1485
  536.          Width           =   460
  537.       End
  538.       Begin VB.CommandButton Operator 
  539.          Caption         =   "%"
  540.          BeginProperty Font 
  541.             Name            =   "Verdana"
  542.             Size            =   9.75
  543.             Charset         =   0
  544.             Weight          =   400
  545.             Underline       =   0   'False
  546.             Italic          =   0   'False
  547.             Strikethrough   =   0   'False
  548.          EndProperty
  549.          Height          =   320
  550.          Index           =   7
  551.          Left            =   645
  552.          TabIndex        =   15
  553.          Top             =   1065
  554.          Width           =   460
  555.       End
  556.       Begin VB.CommandButton Operator 
  557.          Caption         =   "\"
  558.          BeginProperty Font 
  559.             Name            =   "Verdana"
  560.             Size            =   9.75
  561.             Charset         =   0
  562.             Weight          =   400
  563.             Underline       =   0   'False
  564.             Italic          =   0   'False
  565.             Strikethrough   =   0   'False
  566.          EndProperty
  567.          Height          =   320
  568.          Index           =   6
  569.          Left            =   120
  570.          TabIndex        =   14
  571.          Top             =   1065
  572.          Width           =   460
  573.       End
  574.       Begin VB.CommandButton Operator 
  575.          Caption         =   "/"
  576.          BeginProperty Font 
  577.             Name            =   "Verdana"
  578.             Size            =   9.75
  579.             Charset         =   0
  580.             Weight          =   400
  581.             Underline       =   0   'False
  582.             Italic          =   0   'False
  583.             Strikethrough   =   0   'False
  584.          EndProperty
  585.          Height          =   320
  586.          Index           =   4
  587.          Left            =   645
  588.          TabIndex        =   13
  589.          Top             =   645
  590.          Width           =   460
  591.       End
  592.       Begin VB.CommandButton Operator 
  593.          Caption         =   "x"
  594.          BeginProperty Font 
  595.             Name            =   "Verdana"
  596.             Size            =   9.75
  597.             Charset         =   0
  598.             Weight          =   400
  599.             Underline       =   0   'False
  600.             Italic          =   0   'False
  601.             Strikethrough   =   0   'False
  602.          EndProperty
  603.          Height          =   320
  604.          Index           =   3
  605.          Left            =   120
  606.          TabIndex        =   12
  607.          Top             =   645
  608.          Width           =   460
  609.       End
  610.       Begin VB.CommandButton CalculateButton 
  611.          Caption         =   "="
  612.          BeginProperty Font 
  613.             Name            =   "Verdana"
  614.             Size            =   11.25
  615.             Charset         =   0
  616.             Weight          =   700
  617.             Underline       =   0   'False
  618.             Italic          =   0   'False
  619.             Strikethrough   =   0   'False
  620.          EndProperty
  621.          Height          =   315
  622.          Left            =   120
  623.          TabIndex        =   11
  624.          Top             =   1485
  625.          Width           =   975
  626.       End
  627.    End
  628.    Begin VB.Frame Frame3 
  629.       Height          =   1920
  630.       Left            =   3900
  631.       TabIndex        =   6
  632.       Top             =   2040
  633.       Width           =   1725
  634.       Begin VB.CommandButton FunctionButton 
  635.          Caption         =   "int"
  636.          BeginProperty Font 
  637.             Name            =   "Verdana"
  638.             Size            =   9
  639.             Charset         =   0
  640.             Weight          =   400
  641.             Underline       =   0   'False
  642.             Italic          =   0   'False
  643.             Strikethrough   =   0   'False
  644.          EndProperty
  645.          Height          =   315
  646.          Index           =   5
  647.          Left            =   1155
  648.          TabIndex        =   40
  649.          Top             =   653
  650.          Width           =   465
  651.       End
  652.       Begin VB.CommandButton FunctionButton 
  653.          Caption         =   "tan"
  654.          BeginProperty Font 
  655.             Name            =   "Verdana"
  656.             Size            =   9
  657.             Charset         =   0
  658.             Weight          =   400
  659.             Underline       =   0   'False
  660.             Italic          =   0   'False
  661.             Strikethrough   =   0   'False
  662.          EndProperty
  663.          Height          =   320
  664.          Index           =   11
  665.          Left            =   1155
  666.          TabIndex        =   39
  667.          Top             =   1485
  668.          Width           =   460
  669.       End
  670.       Begin VB.CommandButton FunctionButton 
  671.          Caption         =   "sin"
  672.          BeginProperty Font 
  673.             Name            =   "Verdana"
  674.             Size            =   9
  675.             Charset         =   0
  676.             Weight          =   400
  677.             Underline       =   0   'False
  678.             Italic          =   0   'False
  679.             Strikethrough   =   0   'False
  680.          EndProperty
  681.          Height          =   315
  682.          Index           =   8
  683.          Left            =   1155
  684.          TabIndex        =   38
  685.          Top             =   1066
  686.          Width           =   465
  687.       End
  688.       Begin VB.CommandButton FunctionButton 
  689.          Caption         =   "cos"
  690.          BeginProperty Font 
  691.             Name            =   "Verdana"
  692.             Size            =   9
  693.             Charset         =   0
  694.             Weight          =   400
  695.             Underline       =   0   'False
  696.             Italic          =   0   'False
  697.             Strikethrough   =   0   'False
  698.          EndProperty
  699.          Height          =   320
  700.          Index           =   2
  701.          Left            =   1155
  702.          TabIndex        =   37
  703.          Top             =   240
  704.          Width           =   460
  705.       End
  706.       Begin VB.CommandButton FunctionButton 
  707.          Caption         =   "rnd"
  708.          BeginProperty Font 
  709.             Name            =   "Verdana"
  710.             Size            =   9
  711.             Charset         =   0
  712.             Weight          =   400
  713.             Underline       =   0   'False
  714.             Italic          =   0   'False
  715.             Strikethrough   =   0   'False
  716.          EndProperty
  717.          Height          =   320
  718.          Index           =   7
  719.          Left            =   645
  720.          TabIndex        =   36
  721.          Top             =   1066
  722.          Width           =   460
  723.       End
  724.       Begin VB.CommandButton FunctionButton 
  725.          Caption         =   "sqr"
  726.          BeginProperty Font 
  727.             Name            =   "Verdana"
  728.             Size            =   9
  729.             Charset         =   0
  730.             Weight          =   400
  731.             Underline       =   0   'False
  732.             Italic          =   0   'False
  733.             Strikethrough   =   0   'False
  734.          EndProperty
  735.          Height          =   320
  736.          Index           =   10
  737.          Left            =   645
  738.          TabIndex        =   35
  739.          Top             =   1485
  740.          Width           =   460
  741.       End
  742.       Begin VB.CommandButton FunctionButton 
  743.          Caption         =   "fix"
  744.          BeginProperty Font 
  745.             Name            =   "Verdana"
  746.             Size            =   9
  747.             Charset         =   0
  748.             Weight          =   400
  749.             Underline       =   0   'False
  750.             Italic          =   0   'False
  751.             Strikethrough   =   0   'False
  752.          EndProperty
  753.          Height          =   320
  754.          Index           =   4
  755.          Left            =   645
  756.          TabIndex        =   34
  757.          Top             =   653
  758.          Width           =   460
  759.       End
  760.       Begin VB.CommandButton FunctionButton 
  761.          Caption         =   "atn"
  762.          BeginProperty Font 
  763.             Name            =   "Verdana"
  764.             Size            =   9
  765.             Charset         =   0
  766.             Weight          =   400
  767.             Underline       =   0   'False
  768.             Italic          =   0   'False
  769.             Strikethrough   =   0   'False
  770.          EndProperty
  771.          Height          =   315
  772.          Index           =   1
  773.          Left            =   645
  774.          TabIndex        =   33
  775.          Top             =   240
  776.          Width           =   460
  777.       End
  778.       Begin VB.CommandButton FunctionButton 
  779.          Caption         =   "sgn"
  780.          BeginProperty Font 
  781.             Name            =   "Verdana"
  782.             Size            =   9
  783.             Charset         =   0
  784.             Weight          =   400
  785.             Underline       =   0   'False
  786.             Italic          =   0   'False
  787.             Strikethrough   =   0   'False
  788.          EndProperty
  789.          Height          =   320
  790.          Index           =   9
  791.          Left            =   135
  792.          TabIndex        =   10
  793.          Top             =   1485
  794.          Width           =   460
  795.       End
  796.       Begin VB.CommandButton FunctionButton 
  797.          Caption         =   "exp"
  798.          BeginProperty Font 
  799.             Name            =   "Verdana"
  800.             Size            =   9
  801.             Charset         =   0
  802.             Weight          =   400
  803.             Underline       =   0   'False
  804.             Italic          =   0   'False
  805.             Strikethrough   =   0   'False
  806.          EndProperty
  807.          Height          =   315
  808.          Index           =   3
  809.          Left            =   135
  810.          TabIndex        =   9
  811.          Top             =   653
  812.          Width           =   460
  813.       End
  814.       Begin VB.CommandButton FunctionButton 
  815.          Caption         =   "log"
  816.          BeginProperty Font 
  817.             Name            =   "Verdana"
  818.             Size            =   9
  819.             Charset         =   0
  820.             Weight          =   400
  821.             Underline       =   0   'False
  822.             Italic          =   0   'False
  823.             Strikethrough   =   0   'False
  824.          EndProperty
  825.          Height          =   320
  826.          Index           =   6
  827.          Left            =   135
  828.          TabIndex        =   8
  829.          Top             =   1066
  830.          Width           =   460
  831.       End
  832.       Begin VB.CommandButton FunctionButton 
  833.          Caption         =   "abs"
  834.          BeginProperty Font 
  835.             Name            =   "Verdana"
  836.             Size            =   9
  837.             Charset         =   0
  838.             Weight          =   400
  839.             Underline       =   0   'False
  840.             Italic          =   0   'False
  841.             Strikethrough   =   0   'False
  842.          EndProperty
  843.          Height          =   315
  844.          Index           =   0
  845.          Left            =   135
  846.          TabIndex        =   7
  847.          Top             =   240
  848.          Width           =   460
  849.       End
  850.    End
  851.    Begin VB.TextBox Text3 
  852.       BackColor       =   &H00FFFF00&
  853.       BeginProperty Font 
  854.          Name            =   "Verdana"
  855.          Size            =   9.75
  856.          Charset         =   0
  857.          Weight          =   400
  858.          Underline       =   0   'False
  859.          Italic          =   0   'False
  860.          Strikethrough   =   0   'False
  861.       EndProperty
  862.       ForeColor       =   &H00000080&
  863.       Height          =   360
  864.       Left            =   2280
  865.       TabIndex        =   1
  866.       Text            =   "0.0"
  867.       Top             =   1095
  868.       Width           =   3390
  869.    End
  870.    Begin VB.Label Label3 
  871.       Alignment       =   1  'Right Justify
  872.       Caption         =   "X  Value"
  873.       BeginProperty Font 
  874.          Name            =   "MS Sans Serif"
  875.          Size            =   9.75
  876.          Charset         =   0
  877.          Weight          =   400
  878.          Underline       =   0   'False
  879.          Italic          =   0   'False
  880.          Strikethrough   =   0   'False
  881.       EndProperty
  882.       Height          =   225
  883.       Left            =   255
  884.       TabIndex        =   32
  885.       Top             =   1140
  886.       Width           =   1125
  887.    End
  888.    Begin VB.Label Label2 
  889.       Alignment       =   1  'Right Justify
  890.       Caption         =   "Expression"
  891.       BeginProperty Font 
  892.          Name            =   "MS Sans Serif"
  893.          Size            =   9.75
  894.          Charset         =   0
  895.          Weight          =   400
  896.          Underline       =   0   'False
  897.          Italic          =   0   'False
  898.          Strikethrough   =   0   'False
  899.       EndProperty
  900.       Height          =   315
  901.       Left            =   210
  902.       TabIndex        =   31
  903.       Top             =   120
  904.       Width           =   1185
  905.    End
  906.    Begin VB.Label Result 
  907.       BackColor       =   &H00000080&
  908.       BorderStyle     =   1  'Fixed Single
  909.       BeginProperty Font 
  910.          Name            =   "Verdana"
  911.          Size            =   9
  912.          Charset         =   0
  913.          Weight          =   700
  914.          Underline       =   0   'False
  915.          Italic          =   0   'False
  916.          Strikethrough   =   0   'False
  917.       EndProperty
  918.       ForeColor       =   &H00FFFF00&
  919.       Height          =   315
  920.       Left            =   2280
  921.       TabIndex        =   30
  922.       Top             =   1605
  923.       Width           =   3405
  924.    End
  925. Attribute VB_Name = "CalculatorForm"
  926. Attribute VB_GlobalNameSpace = False
  927. Attribute VB_Creatable = False
  928. Attribute VB_PredeclaredId = True
  929. Attribute VB_Exposed = False
  930. '  ******************************
  931. '  ******************************
  932. '  ** MASTERING VB6            **
  933. '  ** by Evangelos Petroutos   **
  934. '  ** SYBEX, 1998              **
  935. '  ******************************
  936. '  ******************************
  937. Private MemValue As Double
  938. Private X As Double
  939. Private SValue As Double
  940. Private OpenLog As Integer
  941. Private Sub CLRButton_Click()
  942.     Text1.Text = ""
  943. End Sub
  944. Private Sub Command1_Click()
  945. Dim Value As Double
  946. On Error GoTo EvalError
  947.     X = Val(Text3.Text)
  948.     ScriptControl1.ExecuteStatement "X=" & X
  949.     Value = ScriptControl1.Eval(Trim(Text1.Text))
  950.     Result.Caption = Value
  951.     UpdateLog
  952.     Exit Sub
  953. EvalError:
  954.     Result.Caption = " Invalid Expression!"
  955.     MsgBox ScriptControl1.Error.Description
  956. End Sub
  957. Private Sub Command2_Click()
  958.     CopyrightForm.Show vbModal
  959. End Sub
  960. Private Sub DelButton_Click()
  961.     If Len(Text1.Text) = 0 Then
  962.         Text1.SetFocus
  963.         Exit Sub
  964.     End If
  965.     If Len(Text1.SelText) > 1 Then
  966.         Text1.SelText = ""
  967.         Text1.SetFocus
  968.         Exit Sub
  969.     End If
  970.     If Text1.SelStart = Len(Text1.Text) Then
  971.         Text1.SetFocus
  972.         Exit Sub
  973.     End If
  974.     SStart = Text1.SelStart
  975.     Text1.Text = Left$(Text1.Text, Text1.SelStart) + Right$(Text1.Text, Len(Text1.Text) - Text1.SelStart - 1)
  976.     Text1.SetFocus
  977.     Text1.SelStart = SStart
  978. End Sub
  979. Private Sub BSButton_Click()
  980.     SStart = Text1.SelStart
  981.     If Text1.SelStart = 0 Then
  982.         Text1.SetFocus
  983.         Text1.SelStart = SStart
  984.         Exit Sub
  985.     Else
  986.         If Text1.SelLength > 1 Then
  987.             Text1.SelText = ""
  988.             Text1.SetFocus
  989.             Text1.SelStart = SStart
  990.         Else
  991.             Text1.Text = Left$(Text1.Text, Text1.SelStart - 1) + Right(Text1.Text, Len(Text1.Text) - Text1.SelStart)
  992.             Text1.SetFocus
  993.             Text1.SelStart = SStart - 1
  994.         End If
  995.     End If
  996. End Sub
  997. Private Sub FileHideShow_Click()
  998.     If FileHideShow.Caption = "Hide Buttons" Then
  999.         Form1.Height = 2790
  1000.         FileHideShow.Caption = "Show Buttons"
  1001.     Else
  1002.         Form1.Height = 4935
  1003.         FileHideShow.Caption = "Hide Buttons"
  1004.     End If
  1005. End Sub
  1006. Private Sub LogBttn_Click()
  1007.     If LogBttn.Caption = "Show  Log" Then
  1008.         OpenLog = True
  1009.         LogBttn.Caption = "Hide  Log"
  1010.         LogForm.Show
  1011.     Else
  1012.         OpenLog = False
  1013.         LogBttn.Caption = "Show  Log"
  1014.         LogForm.List1.Clear
  1015.         LogForm.Hide
  1016.     End If
  1017. End Sub
  1018. Private Sub UpdateLog()
  1019.     LogForm.List1.AddItem Trim(CalculatorForm.Text1.Text)
  1020.     LogForm.List1.AddItem "For X = " + CalculatorForm.Text3.Text
  1021.     LogForm.List1.AddItem ">        " + CalculatorForm.Result.Caption
  1022. End Sub
  1023. Private Sub FunctionButton_Click(Index As Integer)
  1024.     Text1.SelText = ActiveControl.Caption + "("
  1025.     Text1.SetFocus
  1026. End Sub
  1027. Private Sub MemoryMinus_Click()
  1028. On Error Resume Next
  1029.     MemValue = MemValue - Result.Caption
  1030. End Sub
  1031. Private Sub MemoryPlus_Click()
  1032. On Error Resume Next
  1033.     MemValue = MemValue + Result.Caption
  1034. End Sub
  1035. Private Sub MemoryRecall_Click()
  1036. On Error Resume Next
  1037.     Text3.Text = MemValue
  1038.     MemValue = 0
  1039. End Sub
  1040. Private Sub Num_Click(Index As Integer)
  1041.     Text1.SelText = ActiveControl.Caption
  1042.     Text1.SetFocus
  1043. End Sub
  1044. Private Sub NumPeriod_Click()
  1045.     Text1.SelText = ActiveControl.Caption
  1046.     Text1.SetFocus
  1047. End Sub
  1048. Private Sub CalculateButton_Click()
  1049.     Call Command1_Click
  1050. End Sub
  1051. Private Sub Operator_Click(Index As Integer)
  1052.     If ActiveControl.Caption = "%" Then
  1053.             Text1.SelText = " mod "
  1054.         ElseIf ActiveControl.Caption = "x" Then
  1055.             Text1.SelText = "*"
  1056.     Else
  1057.         Text1.SelText = ActiveControl.Caption
  1058.     End If
  1059.     Text1.SetFocus
  1060. End Sub
  1061.