示例二
如果将MultiSelect属性设置为True,可以选择多个文件,通过FileNames属性返回选择的多个文件,例如:
Dim dlg As New OpenFileDialogdlg.MultiSelect = TrueIf dlg.ShowDialog = DialogResult.OK Then OutPut.Show("你选择了" & dlg.FileNames.Length & "个文件, 分别是:") For Each fl As String In dlg.FileNames Output.Show(fl) NextEnd If