home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 5 / MasteringVisualBasic5.iso / ch_code / ch13 / clssform / clssfrm.frm (.txt) next >
Encoding:
Visual Basic Form  |  1997-02-20  |  2.5 KB  |  76 lines

  1. VERSION 5.00
  2. Begin VB.Form ClassForm 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   3195
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   4680
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   3195
  10.    ScaleWidth      =   4680
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin VB.CommandButton Command2 
  13.       Caption         =   "Use PrivateClass Object"
  14.       BeginProperty Font 
  15.          Name            =   "MS Sans Serif"
  16.          Size            =   9.75
  17.          Charset         =   0
  18.          Weight          =   400
  19.          Underline       =   0   'False
  20.          Italic          =   0   'False
  21.          Strikethrough   =   0   'False
  22.       EndProperty
  23.       Height          =   645
  24.       Left            =   390
  25.       TabIndex        =   1
  26.       Top             =   1290
  27.       Width           =   2535
  28.    End
  29.    Begin VB.CommandButton Command1 
  30.       Caption         =   "Use PubicClass Object"
  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          =   645
  41.       Left            =   390
  42.       TabIndex        =   0
  43.       Top             =   510
  44.       Width           =   2535
  45.    End
  46. Attribute VB_Name = "ClassForm"
  47. Attribute VB_GlobalNameSpace = False
  48. Attribute VB_Creatable = False
  49. Attribute VB_PredeclaredId = True
  50. Attribute VB_Exposed = False
  51. Option Explicit
  52. Private Sub Command1_Click()
  53. Dim MyObject As Object
  54. Dim sVal As String, iVal As Integer
  55.     Set MyObject = CreateObject("PubClass.Class1")
  56.     sVal = InputBox("Enter string value")
  57.     MyObject.stringProperty = sVal
  58.     iVal = CInt(InputBox("Enter integer value"))
  59.     MyObject.IntegerProperty = iVal
  60.     MsgBox "stringProperty is " & MyObject.stringProperty & Chr$(13) & _
  61.         "integerProperty is " & MyObject.IntegerProperty
  62.         
  63. End Sub
  64. Private Sub Command1_Click()
  65. Dim MyObject As Object
  66. Dim sVal As String, iVal As Integer
  67.     Set MyObject = CreateObject("PrvClass.Class1")
  68.     sVal = InputBox("Enter string value")
  69.     MyObject.stringProperty = sVal
  70.     iVal = CInt(InputBox("Enter integer value"))
  71.     MyObject.IntegerProperty = iVal
  72.     MsgBox "stringProperty is " & MyObject.stringProperty & Chr$(13) & _
  73.         "integerProperty is " & MyObject.IntegerProperty
  74.         
  75. End Sub
  76.