📄 find.frm
字号:
VERSION 5.00
Begin VB.Form Form2
Caption = "查找结果"
ClientHeight = 2865
ClientLeft = 60
ClientTop = 345
ClientWidth = 7065
LinkTopic = "Form2"
ScaleHeight = 2865
ScaleWidth = 7065
StartUpPosition = 2 'CenterScreen
Begin VB.ListBox List1
Height = 2760
Left = 60
TabIndex = 0
Top = 60
Width = 6975
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Resize()
On Error Resume Next
List1.Width = Form2.Width - 210
List1.Height = Form2.Height - 510
End Sub
Private Sub List1_DblClick()
'On Error Resume Next
If Source = "Declares" Or Source = "Constants" Then
Form1.Data1.Recordset.AbsolutePosition = List1.ItemData(List1.ListIndex) 'c(List1.ListIndex)
If InStr(1, Form1.Text1.Text, Form1.Data1.Recordset!FullName, vbTextCompare) > 0 Then Exit Sub
Form1.Text1.Text = Form1.Text1.Text & Form1.Data1.Recordset!FullName & Chr(13) & Chr(10) & Chr(13) & Chr(10)
End If
If Source = "Types" Then
If InStr(1, Form1.Text1.Text, "Type " & List1.Text & Chr(13) & Chr(10), vbTextCompare) > 0 Then Exit Sub
Form1.Data1.Recordset.MoveFirst
Form1.Data1.Recordset.Move List1.ItemData(List1.ListIndex) 'c(List1.ListIndex)
Typeid = Form1.Data1.Recordset!ID
Form1.Data1.RecordSource = "TypeItems"
Form1.Data1.Refresh
Form1.Data1.Recordset.MoveFirst
Form1.Text1.Text = Form1.Text1.Text & "Type " & List1.Text & Chr(13) & Chr(10)
While Not Form1.Data1.Recordset.EOF
If Form1.Data1.Recordset!Typeid = Typeid Then
Form1.Text1.Text = Form1.Text1.Text & Form1.Data1.Recordset!TypeItem & Chr(13) & Chr(10)
End If
Form1.Data1.Recordset.MoveNext
Wend
Form1.Text1.Text = Form1.Text1.Text & "End Type " & Chr(13) & Chr(10)
Form1.Text1.Text = Form1.Text1.Text & Chr(13) & Chr(10)
Form1.Data1.RecordSource = Source
Form1.Data1.Refresh
End If
End Sub
Private Sub List1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then List1_DblClick
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -