Reputation: 4655
I am opening file dialog at shown way but I need some advanced functionality if possible.
With OpenFileDialog_Restore
.Title = "Choose archive to open"
.InitialDirectory = Path.GetDirectoryName(tempArch)
.Filter = "My archives (*.7z;*.tar)|*.7z;*.tar|All Files(*.*) |*.*"
.AddExtension = True
.ShowDialog()
End With
During to my program needs I would like to have shown ONLY files of asked type (not directories) but with ONLY file names which contain word "archive" inside name.
Is something like that possible?
Upvotes: 0
Views: 4790
Reputation: 3668
Just set your filter accordingly.
With OpenFileDialog_Restore
.Title = "Choose archive to open"
.InitialDirectory = Path.GetDirectoryName(tempArch)
.Filter = "My archives (*.7z;*.tar)|*archive*.7z;*archive*.tar|All Files(*.*) |*.*"
.AddExtension = True
.ShowDialog()
End With
Upvotes: 1