Search code examples
vb.netopenfiledialog

open certain files with OpenFileDialog


I have a button in my program that when clicked opens OpenFileDialog and show all *.jpeg files that are in a certain path. Now, I want to show only those photo files that have "water" in their names not all files. please guide me.


Solution

  • Changing your filter from

    filter = "Images |*.jpeg"
    

    to

    filter = "Images of Water |*water*.jpeg"