Adding filters to the Open File dialog and Selecting Multiple Files
This sample VB.net code snippet shows how to add filters to the Open File dialog and Selecting Multiple Files.
OpenFileDialog1.Filter = "Media Files|*.mpg;*.avi;*.wma;*.mid;*.wav;*.mp2;*.mp3|All Files|*.*"
OpenFileDialog1.FilterIndex = 1
OpenFileDialog1.InitialDirectory = "C:\"
OpenFileDialog1.Title = "Open File"
If (OpenFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK) Then
If (OpenFileDialog1.FileNames.Length > 0) Then
' Make sure the User selected one or more files
For Each strFileName As String In OpenFileDialog1.FileNames
List1.Items.Add(strFileName)
' Loop through the list of selected filenames and add each one to your listbox
Next
End If
End If
Please send me full code with design and how to design it.thank