It didn't know you could do that either. Wow. I always coded it using SendMessage (but then, I've been accused of being API Happy...)VB Code:
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Private Const LVM_FIRST = &H1000 Private Const LVM_SETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 54 Private Const LVM_GETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 55 Private Const LVS_EX_FULLROWSELECT = &H20 Private Sub SetFullRowSelection(ByVal hWndListView, ByVal bFullRow As Boolean) SendMessage hWndListView, VM_SETEXTENDEDLISTVIEWSTYLE, _ LVS_EX_FULLROWSELECT, ByVal CLng(bFullRow)) End Sub 'This is an example of how you can use this routine: ' enable full row selecting SetFullRowSelection ListView1.hwnd, True ' disable full row selecting SetFullRowSelection ListView1.hwnd, False





Reply With Quote