📄 frmfind.frm
字号:
VERSION 5.00
Begin VB.Form frmFind
Appearance = 0 'Flat
BackColor = &H00C0E0FF&
Caption = "查找"
ClientHeight = 2400
ClientLeft = 60
ClientTop = 345
ClientWidth = 5730
LinkTopic = "Form1"
ScaleHeight = 2400
ScaleWidth = 5730
StartUpPosition = 3 '窗口缺省
Begin VB.CheckBox chkRound
Appearance = 0 'Flat
BackColor = &H00C0E0FF&
Caption = "回绕"
ForeColor = &H80000008&
Height = 180
Left = 285
TabIndex = 8
Top = 1680
Width = 855
End
Begin VB.Frame Frame1
Appearance = 0 'Flat
BackColor = &H00C0E0FF&
Caption = "查看"
ForeColor = &H80000008&
Height = 1050
Left = 240
TabIndex = 4
Top = 540
Width = 3615
Begin VB.OptionButton optCondition
Appearance = 0 'Flat
BackColor = &H00C0E0FF&
Caption = "用户代号"
ForeColor = &H80000008&
Height = 255
Index = 0
Left = 120
TabIndex = 6
Top = 240
Value = -1 'True
Width = 1215
End
Begin VB.OptionButton optCondition
Appearance = 0 'Flat
BackColor = &H00C0E0FF&
Caption = "用户姓名"
ForeColor = &H80000008&
Height = 255
Index = 1
Left = 120
TabIndex = 5
Top = 600
Width = 1215
End
End
Begin VB.TextBox txtFind
Appearance = 0 'Flat
Height = 300
Left = 1230
TabIndex = 3
Top = 150
Width = 2655
End
Begin VB.CommandButton cmdCancel
Appearance = 0 'Flat
Cancel = -1 'True
Caption = "取消"
Height = 320
Left = 4140
TabIndex = 2
Top = 540
Width = 1335
End
Begin VB.CommandButton cmdFindNext
Appearance = 0 'Flat
Caption = "查找下一个"
Enabled = 0 'False
Height = 320
Left = 4140
TabIndex = 1
Top = 120
Width = 1335
End
Begin VB.CheckBox chkMatch
Appearance = 0 'Flat
BackColor = &H00C0E0FF&
Caption = "全字匹配"
ForeColor = &H80000008&
Height = 180
Left = 270
TabIndex = 0
Top = 2040
Width = 1215
End
Begin VB.Line Line4
X1 = 5700
X2 = 5700
Y1 = 60
Y2 = 2340
End
Begin VB.Line Line3
X1 = 60
X2 = 5700
Y1 = 60
Y2 = 60
End
Begin VB.Line Line2
X1 = 60
X2 = 5700
Y1 = 2340
Y2 = 2340
End
Begin VB.Line Line1
X1 = 60
X2 = 60
Y1 = 120
Y2 = 2340
End
Begin VB.Label lblworknum
Appearance = 0 'Flat
BackColor = &H00C0E0FF&
Caption = "查找目标:"
ForeColor = &H80000008&
Height = 255
Left = 270
TabIndex = 7
Top = 210
Width = 975
End
End
Attribute VB_Name = "frmFind"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public nod_Current As Node
Public strTable As String
Public strField As String
Public strHeader As String
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdFindNext_Click()
Me.Hide
strFind = Trim(txtFind.Text)
Set nod_Current = frmFields.tvwFile.SelectedItem
If chkRound = 1 Then
blnRoundSelect = True
Else
blnRoundSelect = False
End If
If chkMatch.Value = 1 Then
blnMatchSelect = True
Else
blnMatchSelect = False
End If
If optCondition(0).Value = True Then
Call Find_Next(frmFields, 1, nod_Current, strFind, strTable, strField, strHeader, blnRoundSelect, blnMatchSelect)
frmFields.SetFocus
Exit Sub
End If
If optCondition(1).Value = True Then
Call Find_Next(frmFields, 2, nod_Current, strFind, strTable, strField, strHeader, blnRoundSelect, blnMatchSelect)
frmFields.SetFocus
Exit Sub
End If
End Sub
Private Sub Form_Activate()
Set nod_Current = frmFields.tvwFile.SelectedItem
txtFind.Text = strFind
If txtFind.Text <> "" Then
cmdFindNext.Enabled = True
End If
txtFind.SetFocus
SendKeys "{Home}+{End}"
End Sub
Private Sub txtFind_Change()
If txtFind.Text = "" Then
cmdFindNext.Enabled = False
Else
cmdFindNext.Enabled = True
End If
End Sub
Private Sub txtFind_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If txtFind.Text = "" Then
Exit Sub
End If
Call cmdFindNext_Click
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -