Help with FileListBox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • awais1989
    New Member
    • Jun 2007
    • 13

    #1

    Help with FileListBox

    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.
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    Originally posted by awais1989
    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.
    What version of VB are you using? (I'll assume for now that it's VB6, since that's what I'm familiar with.)

    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

    Working...