Regarding ListView Display

This might be a very simple question to most of you, but i just couldn't find the properties to set it nor online tutorial help much.

I have a listview using lvwList, and all my list item has text which is quite long and result in dot dot dot display which i don't want. For example I want it to Display as "working folder" but it display something like "working f......". How can I explicity set the length of it or make it auto fit my length of string?

thnx for help
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Const LVM_SETCOLUMNWIDTH As Long = (LVM_FIRST + 30)

Public Sub FixWidth(Lv As ListView)
    On Error Resume Next
    Dim col2adjust As Long
    For col2adjust = 0 To Lv.ColumnHeaders.Count - 1
        Call SendMessage(Lv.hwnd, LVM_SETCOLUMNWIDTH, col2adjust, ByVal LVSCW_AUTOSIZE_USEHEADER)
End Sub

declare all that in a module, then call to it like this:

fixwidth YourListView

call it whenever you make changes to the list listview, replace YourListView with the listview in your program
biao81Author Commented:
not working
is it feeding back an error?  call that after you put something new or remove something from the listview.  make sure the name matches.
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

if you are declaring all that stuff in a form you need to switch them to Private instead of Public, that is meant to be in a module...
biao81Author Commented:
Anyway, I just got lots of error, one of the error i'm facing now is
"LVM_FIRST" Constants expression required
biao81, an EE Moderator will handle this for you.
Moderator, my recommended disposition is:

    Refund points and save as a 0-pt PAQ.
    *** good PAQworthy code from NBrownoh, but no followup

Dan Rollins -- EE database cleanup volunteer
PAQed, with points refunded (20)

Community Support Moderator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.