Thursday, February 9, 2012

In vb6 how can i filter what files show up in a file list box ?

im making a jeopardy game and it read the questions from a text file, but i gave it a different extension to distinguis it. its name is 'default.jep'



can i filter what kind of files show up in the filelistbox?In vb6 how can i filter what files show up in a file list box ?
Hi,



Yes, you can. At design time just change the file list box's 'Pattern' property to '*.jep' (without the quotes).



You can add more patterns by using ';' as a separator e.g. '*.jep; *.jpy' will show only files ending in '.jep' and '.jpy'.



At run time (using the default flb's name) you can change it on the fly by adding the line...



File1.Pattern = "*.jep; *.jpy"



...and the effects will be immediate.



Hope this helps.



Good Luck!

No comments:

Post a Comment