Hi vb-world.
A simple question:
How can i select or highlight all the row in a listview?
thanks in advance.
------------------
Angel Maldonado López.
Programmer
[email protected]
Printable View
Hi vb-world.
A simple question:
How can i select or highlight all the row in a listview?
thanks in advance.
------------------
Angel Maldonado López.
Programmer
[email protected]
Try this:
------------------Code:
Private Sub Form_Load()
SetListViewStyle ListView1
End Sub
Private Sub SetListViewStyle(TheList As ListView)
' change the style of the list view so that the whole row may be clicked and it is highlighted
Dim lStyle As Long
Const LVS_EX_FULLROWSELECT = &H20
Const LVM_FIRST = &H1000
Const LVM_GETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + &H37
Const LVM_SETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + &H36
lStyle = SendMessage(TheList.hWnd, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0)
lStyle = lStyle Or LVS_EX_FULLROWSELECT
Call SendMessage(TheList.hWnd, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, ByVal lStyle)
End Sub
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company