I'm surprised this isn't a properly, looks like you have to go down into the Win32 API.
Could you use a DataGridView instead?
Kevin RobertsonOP
@Reply 6 years ago
Alex,
Actually found some code that works.
In the ColumnWidth Changed event:
Static blnChangeWidth As Boolean = True
If blnChangeWidth = True Then
If e.ColumnIndex = 7 Then
blnChangeWidth = False
lvwCurrentAlarms.Columns(e.ColumnIndex).Width = 0
blnChangeWidth = True
End If
End If
That's a nice workaround, I think I saw something similar, just didn't have a chance to try it out.
Does it still let you use the grabber to change the width then just snaps back to the original size?
Kevin RobertsonOP
@Reply 6 years ago
It completely surpresses the resize so there is no noticible chang in the width. Curser still changes but that's not too important. The column I don't want resized is actually a hidden column for the full path to a media file.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Visual Basic Forum.