home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form ClassForm
- Caption = "Form1"
- ClientHeight = 3195
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 4680
- LinkTopic = "Form1"
- ScaleHeight = 3195
- ScaleWidth = 4680
- StartUpPosition = 3 'Windows Default
- Begin VB.CommandButton Command2
- Caption = "Use PrivateClass Object"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 645
- Left = 390
- TabIndex = 1
- Top = 1290
- Width = 2535
- End
- Begin VB.CommandButton Command1
- Caption = "Use PubicClass Object"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 645
- Left = 390
- TabIndex = 0
- Top = 510
- Width = 2535
- End
- Attribute VB_Name = "ClassForm"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub Command1_Click()
- Dim MyObject As Object
- Dim sVal As String, iVal As Integer
- Set MyObject = CreateObject("PubClass.Class1")
- sVal = InputBox("Enter string value")
- MyObject.stringProperty = sVal
- iVal = CInt(InputBox("Enter integer value"))
- MyObject.IntegerProperty = iVal
- MsgBox "stringProperty is " & MyObject.stringProperty & Chr$(13) & _
- "integerProperty is " & MyObject.IntegerProperty
-
- End Sub
- Private Sub Command1_Click()
- Dim MyObject As Object
- Dim sVal As String, iVal As Integer
- Set MyObject = CreateObject("PrvClass.Class1")
- sVal = InputBox("Enter string value")
- MyObject.stringProperty = sVal
- iVal = CInt(InputBox("Enter integer value"))
- MyObject.IntegerProperty = iVal
- MsgBox "stringProperty is " & MyObject.stringProperty & Chr$(13) & _
- "integerProperty is " & MyObject.IntegerProperty
-
- End Sub
-