home *** CD-ROM | disk | FTP | other *** search
/ Using Visual Basic 5 (Platinum Edition) / vb5.iso / Code / ch45 / chp532a.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-07-04  |  4.8 KB  |  145 lines

  1. VERSION 5.00
  2. Begin VB.Form frmchp532 
  3.    Caption         =   "Visual Basic Registry Manipulation"
  4.    ClientHeight    =   3465
  5.    ClientLeft      =   2190
  6.    ClientTop       =   2325
  7.    ClientWidth     =   4500
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   3465
  10.    ScaleWidth      =   4500
  11.    Begin VB.CommandButton cmdDelete 
  12.       Caption         =   "&Delete"
  13.       Height          =   345
  14.       Left            =   1800
  15.       TabIndex        =   8
  16.       ToolTipText     =   "Delete the Key"
  17.       Top             =   2610
  18.       Width           =   855
  19.    End
  20.    Begin VB.CommandButton cmdSave 
  21.       Caption         =   "&Save"
  22.       Height          =   345
  23.       Left            =   2700
  24.       TabIndex        =   4
  25.       ToolTipText     =   "Save The Changes"
  26.       Top             =   2610
  27.       Width           =   855
  28.    End
  29.    Begin VB.CommandButton cmdExit 
  30.       Caption         =   "E&xit"
  31.       Height          =   345
  32.       Left            =   3600
  33.       TabIndex        =   3
  34.       ToolTipText     =   "Exit the Application"
  35.       Top             =   2610
  36.       Width           =   855
  37.    End
  38.    Begin VB.TextBox txtValue 
  39.       Alignment       =   1  'Right Justify
  40.       Height          =   300
  41.       Left            =   1920
  42.       TabIndex        =   2
  43.       ToolTipText     =   "Alter the Value of the Key if it is Incorrect"
  44.       Top             =   2100
  45.       Width           =   2475
  46.    End
  47.    Begin VB.ListBox lstkeys 
  48.       Height          =   1230
  49.       Left            =   1920
  50.       TabIndex        =   1
  51.       ToolTipText     =   "Select the Key to Retreive the Setting for"
  52.       Top             =   780
  53.       Width           =   2505
  54.    End
  55.    Begin VB.ComboBox comAddin 
  56.       Height          =   315
  57.       Left            =   1950
  58.       Style           =   2  'Dropdown List
  59.       TabIndex        =   0
  60.       ToolTipText     =   "Select The Addin You Would like Additioanal Information About"
  61.       Top             =   360
  62.       Width           =   2445
  63.    End
  64.    Begin VB.Label lblKeyValue 
  65.       Alignment       =   1  'Right Justify
  66.       Caption         =   "Key Value"
  67.       Height          =   195
  68.       Left            =   510
  69.       TabIndex        =   7
  70.       Top             =   2130
  71.       Width           =   1275
  72.    End
  73.    Begin VB.Label lblKeys 
  74.       Alignment       =   1  'Right Justify
  75.       Caption         =   "Keys"
  76.       Height          =   195
  77.       Left            =   510
  78.       TabIndex        =   6
  79.       Top             =   810
  80.       Width           =   1275
  81.    End
  82.    Begin VB.Label lblAddin 
  83.       Alignment       =   1  'Right Justify
  84.       Caption         =   "Add in"
  85.       Height          =   195
  86.       Left            =   510
  87.       TabIndex        =   5
  88.       Top             =   360
  89.       Width           =   1275
  90.    End
  91. Attribute VB_Name = "frmchp532"
  92. Attribute VB_GlobalNameSpace = False
  93. Attribute VB_Creatable = False
  94. Attribute VB_PredeclaredId = True
  95. Attribute VB_Exposed = False
  96. Option Explicit
  97. Private Sub cmdDelete_Click()
  98. DeleteSetting "Microsoft Visual Basic Addins", comAddin.Text, lstkeys.Text
  99. End Sub
  100. Private Sub cmdExit_Click()
  101. SaveSetting "chp53smp", "Position", "top", Me.Top
  102. SaveSetting "chp53smp", "Position", "left", Me.Left
  103. SaveSetting "chp53smp", "Position", "height", Me.Height
  104. SaveSetting "chp53smp", "Position", "width", Me.Width
  105. Unload Me
  106. End Sub
  107. Private Sub cmdSave_Click()
  108. SaveSetting "Microsoft Visual Basic Addins", comAddin.Text, lstkeys.Text, txtValue.Text
  109. End Sub
  110. Private Sub comAddin_Click()
  111. Dim vValues As Variant
  112. Dim nCount As Integer
  113. vValues = GetAllSettings("Microsoft Visual Basic Addins", comAddin.Text)
  114. For nCount = LBound(vValues, 1) To UBound(vValues, 1)
  115.     lstkeys.AddItem vValues(nCount, 0)
  116. Next nCount
  117. End Sub
  118. Private Sub Form_Load()
  119. ' Set up the ComboBox with Know Data
  120. comAddin.AddItem "VBAddinToolbar"
  121. comAddin.AddItem "VisData"
  122. comAddin.AddItem "VisualComponentManager"
  123. comAddin.ListIndex = 0
  124. If Len(GetSetting("chp53smp", "Position", "top")) <> 0 Then
  125.      Me.Top = GetSetting("chp53smp", "Position", "top")
  126. End If
  127. If Len(GetSetting("chp53smp", "Position", "left")) <> 0 Then
  128.      Me.Left = GetSetting("chp53smp", "Position", "left")
  129. End If
  130. If Len(GetSetting("chp53smp", "Position", "width")) <> 0 Then
  131.      Me.Width = GetSetting("chp53smp", "Position", "width")
  132.  End If
  133. If Len(GetSetting("chp53smp", "Position", "Height")) <> 0 Then
  134.      Me.Height = GetSetting("chp53smp", "Position", "Height")
  135. End If
  136. End Sub
  137. Private Sub Form_Unload(Cancel As Integer)
  138. Set frmchp532 = Nothing
  139. End Sub
  140. Private Sub lstkeys_Click()
  141. txtValue.Text = GetSetting("Microsoft Visual Basic Addins", comAddin.Text, lstkeys.Text)
  142. End Sub
  143. Private Sub txtValue_Change()
  144. End Sub
  145.