I have a FileListBox named File1. I want it to only display filename excluding extension, and when I click any file's name it will open the file.
Help with FileListBox
Collapse
X
-
What version of VB are you using? (I'll assume for now that it's VB6, since that's what I'm familiar with.)Originally posted by awais1989I have a FileListBox named File1. I want it to only display filename excluding extension, and when I click any file's name it will open the file.
I don't think you can tell it to hide the extensions - that's a function of Windows. You'd have to go to Windows Explorer's view settings and change it, in which case it would apply all the time, not just in your program.
One thing you could try is to place a ListBox control on your form. Copy the contents from the FileListBox to the ListBox, stripping off the extension as you go.
Comment