📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
BackColor = &H00E0E0E0&
Caption = "驱动器、目录和文件列表示例"
ClientHeight = 3795
ClientLeft = 60
ClientTop = 345
ClientWidth = 5205
FillColor = &H00C0C0C0&
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "Form1.frx":0000
LinkTopic = "Form1"
ScaleHeight = 3795
ScaleWidth = 5205
StartUpPosition = 2 '屏幕中心
Begin VB.ComboBox Combo1
Height = 360
ItemData = "Form1.frx":000C
Left = 120
List = "Form1.frx":000E
TabIndex = 3
Text = "Combo1"
Top = 3360
Width = 1695
End
Begin VB.FileListBox File1
Height = 3450
Left = 1920
TabIndex = 2
Top = 240
Width = 3135
End
Begin VB.DirListBox Dir1
Height = 2520
Left = 120
TabIndex = 1
Top = 720
Width = 1695
End
Begin VB.DriveListBox Drive1
Height = 360
Left = 120
TabIndex = 0
Top = 240
Width = 1695
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'CODE Manger By BcodeXRose
'##################################################################
'## 过程名称:Combo1_Click
'## 参数: 无
'##################################################################
Private Sub Combo1_Click()
Select Case Combo1.Text
Case "所有文件(*.*)"
File1.Pattern = "*.*"
Case "可执行程序文件(*.EXE)"
File1.Pattern = "*.EXE"
Case "位图文件(*.BMP)"
File1.Pattern = "*.BMP"
End Select
End Sub
'##################################################################
'## 过程名称:Dir1_Change
'## 参数: 无
'##################################################################
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
'##################################################################
'## 过程名称:Drive1_Change
'## 参数: 无
'##################################################################
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
'##################################################################
'## 过程名称:File1_DblClick
'## 参数: 无
'##################################################################
Private Sub File1_DblClick()
If Right(File1.Path, 1) = "\" Then
fname = File1.Path + File1.FileName
Else
fname = File1.Path + "\" + File1.FileName
End If
ChDrive Drive1.Drive
ChDir File1.Path
retval = Shell(Dir1.Path + "\" + File1.FileName, 1)
End Sub
'##################################################################
'## 过程名称:Form_Load
'## 参数: 无
'##################################################################
Private Sub Form_Load()
Combo1.AddItem "所有文件(*.*)"
Combo1.AddItem "可执行程序文件(*.EXE)"
Combo1.AddItem "位图文件(*.BMP)"
Combo1.ListIndex = 0
End Sub
'##################################################################
'## 过程名称:Text1_DblClick
'## 参数: 无
'##################################################################
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -