📄 frmtpssq.frm
字号:
VERSION 5.00
Begin VB.Form frmTpssq
Caption = "图片搜索器"
ClientHeight = 4920
ClientLeft = 60
ClientTop = 345
ClientWidth = 9375
LinkTopic = "Form1"
ScaleHeight = 4920
ScaleWidth = 9375
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame1
Caption = "搜索图片"
Height = 4635
Left = 3750
TabIndex = 0
Top = 120
Width = 5475
Begin VB.FileListBox File1
Height = 3870
Left = 2850
TabIndex = 4
Top = 510
Width = 2415
End
Begin VB.DirListBox Dir1
Height = 2610
Left = 225
TabIndex = 3
Top = 1785
Width = 2415
End
Begin VB.DriveListBox Drive1
Height = 300
Left = 210
TabIndex = 2
Top = 1155
Width = 2415
End
Begin VB.ComboBox Combo1
Height = 300
Left = 240
Style = 2 'Dropdown List
TabIndex = 1
Top = 555
Width = 2415
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "图片文件:"
Height = 180
Left = 2850
TabIndex = 8
Top = 315
Width = 810
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "文件夹:"
Height = 180
Left = 210
TabIndex = 7
Top = 1560
Width = 630
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "驱动器:"
Height = 180
Left = 210
TabIndex = 6
Top = 945
Width = 630
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "图片类型:"
Height = 180
Left = 210
TabIndex = 5
Top = 315
Width = 810
End
End
Begin VB.Image Image1
BorderStyle = 1 'Fixed Single
Height = 4530
Left = 180
Stretch = -1 'True
Top = 240
Width = 3360
End
End
Attribute VB_Name = "frmTpssq"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private strDri As String
Private Sub File1_Click()
On Error GoTo ERRB
Dim strFilePath As String
strFilePath = File1.Path & "\" & File1.FileName
Image1.Picture = LoadPicture(strFilePath)
Exit Sub
ERRB:
MsgBox "错误号:" & ERR.Number _
& "错误信息:" & ERR.Description
End Sub
Private Sub Form_Load()
Combo1.AddItem "*.BMP"
Combo1.AddItem "*.JPG"
Combo1.AddItem "*.GIF"
Combo1.AddItem "*.BMP;*.JPG;*.GIF"
Combo1.ListIndex = Combo1.ListCount - 1
End Sub
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
Private Sub Drive1_Change()
On Error GoTo ERRB
Dir1.Path = Drive1.Drive
strDri = Drive1.Drive
Exit Sub
ERRB:
MsgBox "错误号:" & ERR.Number _
& "错误信息:" & ERR.Description
Drive1.Drive = strDri
Dir1.Path = strDri
Resume Next
End Sub
Private Sub Drive1_GotFocus()
strDri = Drive1.Drive
End Sub
Private Sub Combo1_Click()
File1.Pattern = Combo1.Text
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -