home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 5 / MasteringVisualBasic5.iso / ch_code / ch13 / calcsrvr / calccln.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-02-20  |  3.6 KB  |  116 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   2055
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   5100
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   2055
  10.    ScaleWidth      =   5100
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin VB.TextBox txtSphere 
  13.       BeginProperty Font 
  14.          Name            =   "MS Sans Serif"
  15.          Size            =   9.75
  16.          Charset         =   0
  17.          Weight          =   400
  18.          Underline       =   0   'False
  19.          Italic          =   0   'False
  20.          Strikethrough   =   0   'False
  21.       EndProperty
  22.       Height          =   330
  23.       Left            =   120
  24.       TabIndex        =   4
  25.       Text            =   "1"
  26.       Top             =   150
  27.       Width           =   735
  28.    End
  29.    Begin VB.CommandButton cmdDisplayMessage 
  30.       Caption         =   "Display Message"
  31.       BeginProperty Font 
  32.          Name            =   "MS Sans Serif"
  33.          Size            =   9.75
  34.          Charset         =   0
  35.          Weight          =   400
  36.          Underline       =   0   'False
  37.          Italic          =   0   'False
  38.          Strikethrough   =   0   'False
  39.       EndProperty
  40.       Height          =   495
  41.       Left            =   3510
  42.       TabIndex        =   3
  43.       Top             =   1140
  44.       Width           =   1335
  45.    End
  46.    Begin VB.CommandButton cmdCreateMessage 
  47.       Caption         =   "Create Message"
  48.       BeginProperty Font 
  49.          Name            =   "MS Sans Serif"
  50.          Size            =   9.75
  51.          Charset         =   0
  52.          Weight          =   400
  53.          Underline       =   0   'False
  54.          Italic          =   0   'False
  55.          Strikethrough   =   0   'False
  56.       EndProperty
  57.       Height          =   495
  58.       Left            =   150
  59.       TabIndex        =   2
  60.       Top             =   1155
  61.       Width           =   1335
  62.    End
  63.    Begin VB.CommandButton cmdSphere 
  64.       Caption         =   "Show  Volume"
  65.       BeginProperty Font 
  66.          Name            =   "MS Sans Serif"
  67.          Size            =   9.75
  68.          Charset         =   0
  69.          Weight          =   400
  70.          Underline       =   0   'False
  71.          Italic          =   0   'False
  72.          Strikethrough   =   0   'False
  73.       EndProperty
  74.       Height          =   330
  75.       Left            =   1005
  76.       TabIndex        =   0
  77.       Top             =   150
  78.       Width           =   1425
  79.    End
  80.    Begin VB.Label lblSphere 
  81.       BorderStyle     =   1  'Fixed Single
  82.       BeginProperty Font 
  83.          Name            =   "MS Sans Serif"
  84.          Size            =   9.75
  85.          Charset         =   0
  86.          Weight          =   400
  87.          Underline       =   0   'False
  88.          Italic          =   0   'False
  89.          Strikethrough   =   0   'False
  90.       EndProperty
  91.       Height          =   330
  92.       Left            =   2580
  93.       TabIndex        =   1
  94.       Top             =   150
  95.       Width           =   2265
  96.    End
  97. Attribute VB_Name = "Form1"
  98. Attribute VB_GlobalNameSpace = False
  99. Attribute VB_Creatable = False
  100. Attribute VB_PredeclaredId = True
  101. Attribute VB_Exposed = False
  102. Option Explicit
  103. Dim MsgServer As Object
  104. Private Sub cmdCreateMessage_Click()
  105.     Set MsgServer = CreateObject("CalcServer.Calc")
  106.     MsgServer.Message = InputBox("Enter Message")
  107. End Sub
  108. Private Sub cmdDisplayMessage_Click()
  109.     MsgBox MsgServer.Message
  110. End Sub
  111. Private Sub cmdSphere_Click()
  112.     Dim sph As Object
  113.     Set sph = CreateObject("CalcServer.Calc")
  114.     lblSphere.Caption = sph.Sphere((txtSphere.Text))
  115. End Sub
  116.