home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form FindKey
- BorderStyle = 1 'Fixed Single
- Caption = "Find Key"
- ClientHeight = 2535
- ClientLeft = 1995
- ClientTop = 2805
- ClientWidth = 4995
- ClipControls = 0 'False
- Height = 3000
- Left = 1905
- LinkTopic = "Form1"
- ScaleHeight = 2535
- ScaleWidth = 4995
- Top = 2430
- Width = 5175
- Begin VB.CommandButton ButtonCancel
- Cancel = -1 'True
- Caption = "Close"
- Height = 375
- Left = 2280
- TabIndex = 8
- Top = 2040
- Width = 1215
- End
- Begin VB.CommandButton ButtonStart
- Caption = "Find"
- Height = 375
- Left = 3600
- TabIndex = 7
- Top = 2040
- Width = 1215
- End
- Begin VB.Frame Frame1
- Caption = "Search Area"
- ClipControls = 0 'False
- Height = 855
- Left = 120
- TabIndex = 4
- Top = 960
- Width = 4695
- Begin VB.OptionButton OptCurrent
- Caption = "Start Search at Current Key"
- Height = 255
- Left = 2280
- TabIndex = 6
- Top = 360
- Value = -1 'True
- Width = 2295
- End
- Begin VB.OptionButton OptRoot
- Caption = "Start Search at Root"
- Height = 255
- Left = 240
- TabIndex = 5
- Top = 360
- Width = 1935
- End
- End
- Begin VB.CheckBox ChkWhole
- Caption = "Match Whole Key Only"
- Height = 375
- Left = 2640
- TabIndex = 3
- Top = 480
- Width = 2175
- End
- Begin VB.CheckBox ChkCase
- Caption = "Match Case"
- Height = 375
- Left = 480
- TabIndex = 2
- Top = 480
- Width = 1815
- End
- Begin VB.TextBox KeyText
- Height = 285
- Left = 1440
- TabIndex = 0
- Top = 120
- Width = 3375
- End
- Begin VB.Label Label1
- BackStyle = 0 'Transparent
- Caption = "Key to Look For:"
- Height = 255
- Left = 120
- TabIndex = 1
- Top = 120
- Width = 1215
- End
- Attribute VB_Name = "FindKey"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- ' Cancel Button. Unloads the dialog box.
- Private Sub ButtonCancel_Click()
- Unload FindKey
- End Sub
- ' Find Button. Finds all the keys that match and
- ' puts them into another from.
- Private Sub ButtonStart_Click()
- Dim sCase As Boolean
- Dim whole As Boolean
- Dim AtRoot As Boolean
- Dim RetVal As Boolean
- If Len(KeyText.Text) = 0 Then
- MsgBox ("Cannot look for a null key")
- Exit Sub
- End If
- sCase = (ChkCase.Value = 1)
- whole = (ChkWhole.Value = 1)
- AtRoot = OptRoot.Value
- FindKey.MousePointer = 11
- RetVal = BaseForm.Registry1.FindFirstKey(KeyText, sCase, whole, AtRoot)
- If RetVal = False Then
- MsgBox ("There are no keys in this root that match.")
- FindKey.MousePointer = 0
- Exit Sub
- End If
- FindKey.MousePointer = 0
- FindResults.listresults.Clear
- Do
- FindResults.listresults.AddItem BaseForm.Registry1.FindResultKey
- Loop While BaseForm.Registry1.FindNextKey() = True
- FindResults.Show
- Exit Sub
- End Sub
-