Solved

FileListBox won't display long file names

Posted on 2002-06-13
4
158 Views
Last Modified: 2006-11-17
I'm using a FileListBox in one of my projects. It is populated using the change event on a DirListBox (FileListBox.path = DirListBox.path). The problem that I've got is that when a directory name has a space in it the file list box does not diplay the full file name. It only shows the first eight characters then the extension. When the files have the same first eight character it substitutes the last two characters for numbers i.e. testfil1, testfil2 etc. Does anyone know why this is and how if can be remedied?

Many thanks,

Dust.



0
Comment
Question by:dustybryn
  • 2
4 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 7075595
This is probably because of your version of VB, i guess you have VB5...
CHeers
0
 

Author Comment

by:dustybryn
ID: 7075632
I'm using VB6 Enterprise Edition, try it for yourself.
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 75 total points
ID: 7075634
THe FileListBox, DriveListbox and DirListBox for the most part are deprecated controls.  Take a look at these two articles from MSDN:
PRB: FileListBox Control May Not List File Names Properly (Q196028)
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q196028&SD=MSKB&
PRB: Problems Using Intrinsic File System Controls (Q196141)
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q196141

Anthony
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 7075655
In fact, for me the controls work fine...
So I can only suggest what is said in the articles of acperkins: develop your own routines for this, using either DIR() function, the Scripting.Filesystem object or (for hardcore developers) some API functions.

BTW, I don't use those controls except for creating some demo programs...

CHeers
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question