home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / ole / ipdrive / vbdrive.frm < prev   
Text File  |  1998-03-26  |  3KB  |  111 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "InProc Driver"
  4.    ClientHeight    =   2100
  5.    ClientLeft      =   255
  6.    ClientTop       =   5955
  7.    ClientWidth     =   5310
  8.    Height          =   2505
  9.    Left            =   195
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   2100
  12.    ScaleWidth      =   5310
  13.    Top             =   5610
  14.    Width           =   5430
  15.    Begin CommandButton Remove 
  16.       Caption         =   "&Remove"
  17.       Height          =   375
  18.       Left            =   3600
  19.       TabIndex        =   8
  20.       Top             =   1200
  21.       Width           =   1335
  22.    End
  23.    Begin CommandButton Add 
  24.       Caption         =   "&Add"
  25.       Height          =   375
  26.       Left            =   3600
  27.       TabIndex        =   7
  28.       Top             =   720
  29.       Width           =   1335
  30.    End
  31.    Begin CommandButton Lookup 
  32.       Caption         =   "&Lookup"
  33.       Height          =   375
  34.       Left            =   3600
  35.       TabIndex        =   6
  36.       Top             =   240
  37.       Width           =   1335
  38.    End
  39.    Begin TextBox MapTo 
  40.       Height          =   285
  41.       Left            =   840
  42.       TabIndex        =   1
  43.       Top             =   720
  44.       Width           =   2055
  45.    End
  46.    Begin TextBox MapFrom 
  47.       Height          =   285
  48.       Left            =   840
  49.       TabIndex        =   0
  50.       Top             =   240
  51.       Width           =   2055
  52.    End
  53.    Begin Label MapCount 
  54.       Height          =   255
  55.       Left            =   960
  56.       TabIndex        =   5
  57.       Top             =   1320
  58.       Width           =   1935
  59.    End
  60.    Begin Label Label3 
  61.       Caption          =   "Count:"
  62.       Height          =   255
  63.       Left            =   240
  64.       TabIndex        =   4
  65.       Top             =   1320
  66.       Width           =   615
  67.    End
  68.    Begin Label Label2 
  69.       Caption         =   "&To:"
  70.       Height          =   255
  71.       Left            =   240
  72.       TabIndex        =   3
  73.       Top             =   720
  74.       Width           =   495
  75.    End
  76.    Begin Label Label1 
  77.       Caption         =   "&From:"
  78.       Height          =   255
  79.       Left            =   240
  80.       TabIndex        =   2
  81.       Top             =   240
  82.       Width           =   615
  83.    End
  84. End
  85. Dim map As object
  86.  
  87. Sub Add_Click ()
  88.     map.SetAt mapFrom.text, MapTo.text
  89.     Lookup_Click
  90.     MapCount.caption = map.Count
  91. End Sub
  92.  
  93. Sub Form_Load ()
  94.     Set map = CreateObject("mfc.inproc.varmap")
  95. End Sub
  96.  
  97. Sub Form_Unload (Cancel As Integer)
  98.     Set map = Nothing
  99. End Sub
  100.  
  101. Sub Lookup_Click ()
  102.     temp = map.Item(mapFrom.text)
  103.     MapTo.text = temp
  104. End Sub
  105.  
  106. Sub Remove_Click ()
  107.     map.RemoveKey mapFrom.text
  108.     MapTo.text = "<nothing>"
  109.     MapCount.caption = map.Count
  110. End Sub
  111.