Option Explicit
Private Sub Command1_Click(Index As Integer)
Select Case Index 以命令按钮的索引作为测试表达式
Case 0
File1.Pattern = "*.*"
Case 1
File1.Pattern = "*.txt"
Case 2
File1.Pattern = "*.jpg;*.bmp;*.tif"
Case 3
File1.Pattern = "*.mp3;*.wav;*.avi;*.dat"
End Select
End Sub
Private Sub Dir1_Change()
File1.Path = Dir1.Path 目录列表改变时,文件列表也改变
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive 驱动器列表改变时,目录列表页改变
End Sub
Private Sub Form_Load()
Dir1.Path = "C:windows" 显示c磁盘中的windows文件下的文件
End Sub
原文链接:https://www.f2er.com/vb/260404.html