Solved

FileListBox won't display long file names

Posted on 2002-06-13
4
152 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]
Comment Utility
This is probably because of your version of VB, i guess you have VB5...
CHeers
0
 

Author Comment

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

Accepted Solution

by:
Anthony Perkins earned 75 total points
Comment Utility
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]
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now