home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Unleashed / Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso / source / chap17 / addin4.cls < prev    next >
Encoding:
Text File  |  1995-09-24  |  2.1 KB  |  62 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4. END
  5. Attribute VB_Name = "AddInClass"
  6. Attribute VB_Creatable = False
  7. Attribute VB_Exposed = False
  8. Option Explicit
  9.  
  10. Public thisInstance As VBIDE.Application
  11. Dim numDialog As Integer
  12.  
  13. Public Sub AfterClick()
  14.     numDialog = numDialog + 1
  15.     ' This With statement is changing the
  16.     ' properties of a VBIDE.FormTemplate
  17.     With thisInstance.ActiveProject.AddFormTemplate
  18.         .Properties("BackColor") = &H800080
  19.         .Properties("BorderStyle") = 1
  20.         .Properties("Caption") = "About Add-In Examples"
  21.         .Properties("ControlBox") = False
  22.         .Properties("Height") = 2500
  23.         .Properties("Left") = 1000
  24.         .Properties("Name") = "AboutFrm" + Right(Str(numDialog), 1)
  25.         .Properties("MaxButton") = False
  26.         .Properties("MinButton") = False
  27.         .Properties("Top") = 1000
  28.         .Properties("Width") = 5000
  29.  
  30.         ' This With statement is changing the
  31.         ' properties of a VBIDE.ControlTemplate
  32.         With .ControlTemplates.Add("CommandButton")
  33.             .Properties("Caption") = "&OK"
  34.             .Properties("Left") = 2000
  35.             .Properties("Width") = 1000
  36.             .Properties("Top") = 1320
  37.         End With
  38.  
  39.         With .ControlTemplates.Add("Label")
  40.             .Properties("BackColor") = &H800080
  41.             .Properties("Caption") = "Copyright 1995, SAMS"
  42.             .Properties("ForeColor") = &H80FFFF
  43.             .Properties("Left") = 1550
  44.             .Properties("Height") = 250
  45.             .Properties("Width") = 1700
  46.             .Properties("Top") = 850
  47.         End With
  48.  
  49.         With .ControlTemplates.Add("Label")
  50.             .Properties("Alignment") = 2 ' center
  51.             .Properties("BackColor") = &H800080
  52.             .Properties("Caption") = "AddIn Examples 3 - Version 1.0"
  53.             .Properties("ForeColor") = &H80FFFF
  54.             .Properties("Height") = 250
  55.             .Properties("Left") = 250
  56.             .Properties("Width") = 4500
  57.             .Properties("Top") = 250
  58.         End With
  59.     End With
  60. End Sub
  61.  
  62.