📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form form1
Caption = "批量删除某类文件"
ClientHeight = 3000
ClientLeft = 60
ClientTop = 345
ClientWidth = 4710
LinkTopic = "Form1"
ScaleHeight = 3000
ScaleWidth = 4710
StartUpPosition = 1 '所有者中心
Begin VB.DriveListBox Drive1
Height = 300
Left = 75
TabIndex = 7
Top = 90
Width = 1500
End
Begin VB.TextBox Text2
Height = 300
Left = 2490
TabIndex = 6
Top = 90
Width = 2175
End
Begin VB.TextBox Text1
Height = 300
Left = 2295
TabIndex = 5
Text = "bmp"
Top = 705
Width = 495
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 360
Left = 3225
TabIndex = 3
Top = 2565
Width = 1305
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 360
Left = 1830
TabIndex = 2
Top = 2565
Width = 1305
End
Begin VB.DirListBox Dir1
Height = 1140
Left = 75
TabIndex = 1
Top = 435
Width = 1500
End
Begin VB.FileListBox File1
Height = 1350
Hidden = -1 'True
Left = 75
System = -1 'True
TabIndex = 0
Top = 1605
Width = 1500
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "选中目录 扩展名"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1125
Left = 1635
TabIndex = 4
Top = 135
Width = 975
End
End
Attribute VB_Name = "form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
Dir1.Path = App.Path & "\ml" '默认文件路径
File1.Path = Dir1.Path
File1.Pattern = "*.bmp"
Text2.Text = File1.Path
End Sub
Private Sub Drive1_Change() '选择驱动器
Dir1.Path = Drive1.Drive
End Sub
Private Sub Dir1_Change() '选择文件夹
File1.Path = Dir1.Path
Text2.Text = File1.Path
End Sub
Private Sub Text1_Change()
File1.Pattern = "*" & "." & Text1.Text
End Sub
Private Sub Command1_Click() '删除文件
For i = o To File1.ListCount - 1
File1.ListIndex = i
Kill File1.Path & "\" & File1.FileName
Next i
File1.Refresh
End Sub
Private Sub Command2_Click()
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -