VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "MyCom Server Tester"
   ClientHeight    =   4380
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5370
   Icon            =   "Form1.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   4380
   ScaleWidth      =   5370
   StartUpPosition =   2  'CenterScreen
   Begin VB.Frame Frame2 
      Caption         =   "Object 2"
      Height          =   3495
      Left            =   2880
      TabIndex        =   7
      Top             =   360
      Width           =   2235
      Begin VB.TextBox Text3 
         Height          =   315
         Left            =   240
         TabIndex        =   11
         Text            =   "Text1"
         Top             =   660
         Width           =   1755
      End
      Begin VB.TextBox Text4 
         Height          =   315
         Left            =   240
         TabIndex        =   10
         Text            =   "25"
         Top             =   1680
         Width           =   1755
      End
      Begin VB.CommandButton cmdRaise2 
         Caption         =   "Raise"
         Height          =   375
         Left            =   540
         TabIndex        =   9
         Top             =   2280
         Width           =   1155
      End
      Begin VB.CommandButton cmdReset2 
         Caption         =   "Reset"
         Height          =   375
         Left            =   540
         TabIndex        =   8
         Top             =   2880
         Width           =   1155
      End
      Begin VB.Label Label4 
         Caption         =   "Value:"
         Height          =   195
         Left            =   300
         TabIndex        =   13
         Top             =   420
         Width           =   675
      End
      Begin VB.Label Label3 
         Caption         =   "Raise Value:"
         Height          =   195
         Left            =   300
         TabIndex        =   12
         Top             =   1440
         Width           =   915
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "Object 1"
      Height          =   3495
      Left            =   240
      TabIndex        =   0
      Top             =   360
      Width           =   2235
      Begin VB.CommandButton cmdReset1 
         Caption         =   "Reset"
         Height          =   375
         Left            =   540
         TabIndex        =   6
         Top             =   2880
         Width           =   1155
      End
      Begin VB.CommandButton cmdRaise1 
         Caption         =   "Raise"
         Height          =   375
         Left            =   540
         TabIndex        =   3
         Top             =   2280
         Width           =   1155
      End
      Begin VB.TextBox Text2 
         Height          =   315
         Left            =   240
         TabIndex        =   2
         Text            =   "10"
         Top             =   1680
         Width           =   1755
      End
      Begin VB.TextBox Text1 
         Height          =   315
         Left            =   240
         TabIndex        =   1
         Text            =   "Text1"
         Top             =   660
         Width           =   1755
      End
      Begin VB.Label Label2 
         Caption         =   "Raise Value:"
         Height          =   195
         Left            =   300
         TabIndex        =   5
         Top             =   1440
         Width           =   915
      End
      Begin VB.Label Label1 
         Caption         =   "Value:"
         Height          =   195
         Left            =   300
         TabIndex        =   4
         Top             =   420
         Width           =   675
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private MC1 As New MyCom2
Private MC2 As Object       ' let's late bind here
                            ' force IDispatch to be used
Private Sub cmdRaise1_Click()
    MC1.Raise (Text2)       ' read the object value
    Text1 = MC1.Value       ' refresh the display
End Sub

Private Sub cmdRaise2_Click()
    MC2.Raise (Text4)       ' read the object value
    Text3 = MC2.Value       ' refresh the display
End Sub

Private Sub cmdReset1_Click()
    MC1.Value = 0           ' set the object value to zero
    Text1 = MC1.Value       ' refresh the display
End Sub

Private Sub cmdReset2_Click()
    MC2.Value = 0           ' set the object value to zero
    Text3 = MC2.Value       ' refresh the display
End Sub

Private Sub Form_Load()
    Set MC1 = New MyCom2    ' create the objects
    MC1.Value = 100         ' set initial values
    Text1 = MC1.Value       ' refresh the displays
    Set MC2 = New MyCom2    ' create the objects
    MC2.Value = 100         ' set initial values
    Text3 = MC2.Value       ' refresh the displays
End Sub
