home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmFind
- Caption = "Find Text"
- ClientHeight = 1500
- ClientLeft = 930
- ClientTop = 945
- ClientWidth = 5415
- LinkTopic = "Form1"
- MDIChild = -1 'True
- ScaleHeight = 1500
- ScaleWidth = 5415
- Begin VB.CommandButton cmdFind
- Caption = "&Find"
- Default = -1 'True
- Height = 255
- Left = 240
- Style = 1 'Graphical
- TabIndex = 6
- ToolTipText = "Start Search"
- Top = 1200
- Width = 1092
- End
- Begin VB.CommandButton cmdcancel
- Cancel = -1 'True
- Caption = "Cancel"
- Height = 255
- Left = 3960
- TabIndex = 5
- ToolTipText = "Return to Notepad"
- Top = 1200
- Width = 1092
- End
- Begin VB.TextBox txtFind
- Height = 285
- Left = 720
- TabIndex = 0
- ToolTipText = "Text to Find"
- Top = 120
- Width = 4575
- End
- Begin VB.CheckBox chkCase
- Caption = "Match &Case"
- Height = 495
- Left = 120
- TabIndex = 4
- ToolTipText = "Case Sensitivity"
- Top = 600
- Width = 1335
- End
- Begin VB.Frame Frame1
- Caption = "Direction"
- Height = 612
- Left = 3240
- TabIndex = 1
- Top = 480
- Width = 2052
- Begin VB.OptionButton optDirection
- Caption = "&Up"
- Height = 252
- Index = 0
- Left = 240
- TabIndex = 3
- ToolTipText = "Search to Beginning of Document"
- Top = 240
- Width = 612
- End
- Begin VB.OptionButton optDirection
- Caption = "&Down"
- Height = 252
- Index = 1
- Left = 960
- TabIndex = 2
- ToolTipText = "Search to End of Document"
- Top = 240
- Value = -1 'True
- Width = 852
- End
- End
- Begin VB.Label Label1
- Caption = "Fi&nd :"
- Height = 255
- Left = 120
- TabIndex = 7
- Top = 120
- Width = 495
- End
- Attribute VB_Name = "frmFind"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub chkCase_Click()
- ' Assign a value to the public variable.
- FindCase = chkCase.Value
- End Sub
- Private Sub cmdCancel_Click()
- ' Save the values to the public variables.
- FindStrings = txtFind.Text
- FindCase = chkCase.Value
- ' Unload the find dialog.
- Unload frmFind
- End Sub
- Private Sub cmdFind_Click()
- ' Assigns the text string to a public variable.
- FindStrings = txtFind.Text
- FindIt
- End Sub
- Private Sub Form_Load()
- ' Disable the find button - no text to find yet.
- cmdFind.Enabled = False
- ' Read the public variable & set the option button.
- optDirection(FindDirection).Value = 1
- Me.Height = 1905
- Me.Width = 5535
- Me.Left = 1455
- Me.Top = 1500
- End Sub
- Private Sub optDirection_Click(Index As Integer)
- ' Assign a value to the public variable.
- FindDirection = Index
- End Sub
- Private Sub txtFind_Change()
- ' Set the public variable.
- FirstTime = True
- ' If the textbox is empty, disable the find button.
- If txtFind.Text = "" Then
- cmdFind.Enabled = False
- Else
- cmdFind.Enabled = True
- End If
- End Sub
-