Solved

FileListBox won't display long file names

Posted on 2002-06-13
4
162 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 143

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 143

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

856 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