VERSION 5.00
Begin VB.Form frmFind 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "查找"
   ClientHeight    =   1395
   ClientLeft      =   2655
   ClientTop       =   3585
   ClientWidth     =   5445
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   9
      Charset         =   134
      Weight          =   700
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1395
   ScaleWidth      =   5445
   Begin VB.Frame Frame1 
      Caption         =   "方向"
      Height          =   612
      Left            =   1680
      TabIndex        =   3
      Top             =   720
      Width           =   2535
      Begin VB.OptionButton optDirection 
         Caption         =   "向下(&D)"
         Height          =   252
         Index           =   1
         Left            =   1200
         TabIndex        =   5
         ToolTipText     =   "搜索到文档尾部"
         Top             =   240
         Width           =   1215
      End
      Begin VB.OptionButton optDirection 
         Caption         =   "向上(&U)"
         Height          =   252
         Index           =   0
         Left            =   120
         TabIndex        =   4
         ToolTipText     =   "搜索到文档头部"
         Top             =   240
         Value           =   -1  'True
         Width           =   1095
      End
   End
   Begin VB.CheckBox chkCase 
      Caption         =   "匹配大小写(&C)"
      Height          =   495
      Left            =   120
      TabIndex        =   2
      ToolTipText     =   "大小写敏感"
      Top             =   720
      Width           =   1695
   End
   Begin VB.TextBox Text1 
      Height          =   500
      Left            =   1680
      TabIndex        =   1
      ToolTipText     =   "要查找的文本"
      Top             =   120
      Width           =   2535
   End
   Begin VB.CommandButton cmdcancel 
      Cancel          =   -1  'True
      Caption         =   "取消"
      Height          =   372
      Left            =   4320
      TabIndex        =   7
      ToolTipText     =   "返回记事本"
      Top             =   600
      Width           =   1092
   End
   Begin VB.CommandButton cmdFind 
      Caption         =   "查找(&F)"
      Default         =   -1  'True
      Height          =   372
      Left            =   4320
      TabIndex        =   6
      ToolTipText     =   "开始搜索"
      Top             =   120
      Width           =   1092
   End
   Begin VB.Label Label1 
      Caption         =   "查找内容(&N):"
      Height          =   255
      Left            =   120
      TabIndex        =   0
      Top             =   240
      Width           =   1335
   End
End
Attribute VB_Name = "frmFind"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*** “查找”对话框用来搜索文本。               ***
'*** 为 MDI 记事本示例应用程序而创建            ***
'*** 用途：公共变量 gFindCase (切换大小写敏感); ***
'*** gFindString (搜索文本);                    ***
'*** gFindDirection (切换搜索方向);             ***
'*** gFirstTime (切换从文本头部开始)            ***
'**************************************************

Option Explicit

'Private Sub chkCase_Click()
'    ' 给公共变量赋值。
'    gFindCase = chkCase.Value
'End Sub
'
Private Sub cmdCancel_Click()
    ' 将值保存到公共变量。
'    gFindString = Text1.Text
'    gFindCase = chkCase.Value
    ' 卸载“查找”对话框。
    Unload frmFind
End Sub

Private Sub cmdFind_Click()
    ' 将文本字符串赋值给公共变量。
    gFindString = Text1.Text
    FindIt
End Sub

'Private Sub Form_Load()
'    ' “查找”按钮无效 - 还没有要查找的文本。
'    cmdFind.Enabled = False
'    ' 读公共变量并设置选项按钮。
'    optDirection(gFindDirection).Value = 1
'End Sub

Private Sub optDirection_Click(index As Integer)
    ' 给公共变量赋值。
    gFindDirection = index
End Sub

