home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / atl / mfcatl / mfcatl.frm < prev    next >
Text File  |  1998-03-26  |  2KB  |  70 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "VB driver for MfcAtl Sample"
  4.    ClientHeight    =   3060
  5.    ClientLeft      =   1140
  6.    ClientTop       =   1515
  7.    ClientWidth     =   3720
  8.    Height          =   3465
  9.    Left            =   1080
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   3060
  12.    ScaleWidth      =   3720
  13.    Top             =   1170
  14.    Width           =   3840
  15.    Begin VB.CommandButton Command3 
  16.       Caption         =   "Call Both Objects"
  17.       Height          =   735
  18.       Left            =   360
  19.       TabIndex        =   2
  20.       Top             =   2160
  21.       Width           =   2895
  22.    End
  23.    Begin VB.CommandButton Command2 
  24.       Caption         =   "Call Object Two"
  25.       Height          =   735
  26.       Left            =   360
  27.       TabIndex        =   1
  28.       Top             =   1200
  29.       Width           =   2895
  30.    End
  31.    Begin VB.CommandButton Command1 
  32.       Caption         =   "Call Object One"
  33.       Height          =   735
  34.       Left            =   360
  35.       TabIndex        =   0
  36.       Top             =   240
  37.       Width           =   2895
  38.    End
  39. End
  40. Attribute VB_Name = "Form1"
  41. Attribute VB_Creatable = False
  42. Attribute VB_Exposed = False
  43.  
  44. Private Sub Command1_Click()
  45.     Dim obj1 As Object
  46.     Set obj1 = CreateObject("MfcAtl.ObjectOne")
  47.     MsgBox obj1.SayHello()
  48.     Set obj1 = Nothing
  49. End Sub
  50.  
  51.  
  52. Private Sub Command2_Click()
  53.     Dim obj2 As New ObjectTwo
  54.     MsgBox obj2.SayHello()
  55.     Set obj2 = Nothing
  56. End Sub
  57.  
  58.  
  59. Private Sub Command3_Click()
  60.     Dim obj1 As Object
  61.     Set obj1 = CreateObject("MfcAtl.ObjectOne")
  62.     Dim obj2 As New ObjectTwo
  63.     MsgBox obj1.SayHello()
  64.     MsgBox obj2.SayHello()
  65.     Set obj2 = Nothing
  66.     Set obj1 = Nothing
  67. End Sub
  68.  
  69.  
  70.