Bonjour
Voici une manière de filtrer à l'ouverture les extensions:
Un label nommé: Lblsource
Un comboBox nommé: cmbext
dans lequel tu mets:
*.exe et *.txt
Dim a As New FolderBrowserDialog
Lblsource.Text = "" 'effacement du chemin
FileListBox1.Items.Clear() 'effacement de la liste
On Error Resume Next
If a.ShowDialog = Windows.Forms.DialogResult.OK Then
Lblsource.Text = "" & a.SelectedPath & ""
FileListBox1.Pattern = cmbext.Text
FileListBox1.Path = Lblsource.Text
Else
MessageBox.Show("Opération annulée par l'utilisateur!", "Ouverture dossier", MessageBoxButtons.OK, MessageBoxIcon.Information)
Exit Sub
End If
@+Le Pivert