home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / cdllvb / maincal8.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-05-08  |  4.5 KB  |  161 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "Calulator Using Functions & DLL"
  4.    ClientHeight    =   4335
  5.    ClientLeft      =   1365
  6.    ClientTop       =   2400
  7.    ClientWidth     =   7890
  8.    Height          =   4740
  9.    Left            =   1305
  10.    LinkMode        =   1  'Source
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   4335
  13.    ScaleWidth      =   7890
  14.    Top             =   2055
  15.    Width           =   8010
  16.    Begin CheckBox StringOption 
  17.       Caption         =   "String"
  18.       Height          =   615
  19.       Left            =   480
  20.       TabIndex        =   9
  21.       Top             =   3240
  22.       Width           =   1335
  23.    End
  24.    Begin Frame StringFrame 
  25.       Caption         =   "Text Received from C++ DLL"
  26.       Height          =   735
  27.       Left            =   2040
  28.       TabIndex        =   10
  29.       Top             =   3120
  30.       Width           =   2775
  31.       Begin TextBox StringText 
  32.          BorderStyle     =   0  'None
  33.          Height          =   255
  34.          Left            =   240
  35.          TabIndex        =   11
  36.          Text            =   "Message 1 from Start"
  37.          Top             =   360
  38.          Width           =   2415
  39.       End
  40.    End
  41.    Begin CommandButton Quit 
  42.       Caption         =   "Quit"
  43.       Height          =   975
  44.       Left            =   6120
  45.       TabIndex        =   6
  46.       Top             =   2880
  47.       Width           =   1095
  48.    End
  49.    Begin CommandButton Calculate 
  50.       Caption         =   "Calculate"
  51.       Height          =   855
  52.       Left            =   5400
  53.       TabIndex        =   5
  54.       Top             =   1320
  55.       Width           =   2295
  56.    End
  57.    Begin CheckBox AddOption 
  58.       Caption         =   "Add"
  59.       Height          =   615
  60.       Left            =   480
  61.       TabIndex        =   7
  62.       Top             =   1320
  63.       Width           =   1335
  64.    End
  65.    Begin Frame AddFrame 
  66.       Caption         =   "Sum from C++ DLL"
  67.       Height          =   735
  68.       Left            =   2040
  69.       TabIndex        =   4
  70.       Top             =   1200
  71.       Width           =   2415
  72.       Begin TextBox Addtext 
  73.          BorderStyle     =   0  'None
  74.          Height          =   255
  75.          Left            =   240
  76.          TabIndex        =   8
  77.          Text            =   "will appear here"
  78.          Top             =   360
  79.          Width           =   1575
  80.       End
  81.    End
  82.    Begin TextBox val2 
  83.       Height          =   375
  84.       Left            =   5640
  85.       TabIndex        =   3
  86.       Text            =   "Enter 2nd Number"
  87.       Top             =   240
  88.       Width           =   2055
  89.    End
  90.    Begin TextBox val1 
  91.       Height          =   375
  92.       Left            =   1800
  93.       TabIndex        =   1
  94.       Text            =   "Enter 1st Number"
  95.       Top             =   240
  96.       Width           =   2055
  97.    End
  98.    Begin Label Label4 
  99.       Caption         =   "2) Then Press Calculate:"
  100.       Height          =   255
  101.       Left            =   5280
  102.       TabIndex        =   13
  103.       Top             =   840
  104.       Width           =   2295
  105.    End
  106.    Begin Label Label3 
  107.       Caption         =   "1) Pick those you want:"
  108.       Height          =   255
  109.       Left            =   480
  110.       TabIndex        =   12
  111.       Top             =   840
  112.       Width           =   2055
  113.    End
  114.    Begin Label Label2 
  115.       Caption         =   "2nd Number"
  116.       Height          =   255
  117.       Left            =   4200
  118.       TabIndex        =   2
  119.       Top             =   240
  120.       Width           =   1335
  121.    End
  122.    Begin Label Label1 
  123.       Caption         =   "1st Number"
  124.       Height          =   255
  125.       Left            =   480
  126.       TabIndex        =   0
  127.       Top             =   240
  128.       Width           =   1215
  129.    End
  130. Sub AddOption_Click ()
  131.     AddOption.enabled = True
  132. End Sub
  133. Sub Calculate_Click ()
  134.     Static x1 As Integer
  135.     Static y1 As Integer
  136.     Static r As Integer
  137.     Static x2 As Single
  138.     Static y2 As Single
  139.     Static z As String
  140.     x1 = Val(val1.text)
  141.     y1 = Val(val2.text)
  142.     x2 = Val(val1.text)
  143.     y2 = Val(val2.text)
  144.     z = "Message 1 from Main"
  145. 'get info
  146.     If (AddOption.value = 1) Then
  147.         addtext.text = Str$(add1(x1, y1))
  148.         Else
  149.         addtext.text = ""
  150.     End If
  151.     If (StringOption.value = 1) Then
  152.         r = strcpy1(z)
  153.         StringText.text = z
  154.         Else
  155.         StringText.text = ""
  156.     End If
  157. End Sub
  158. Sub Quit_Click ()
  159.     End
  160. End Sub
  161.