You didn't add the LVM_FIRST declaration that I posted above. The above should work and highlight the first item. For the 2nd item you should use (I'm guessing) :
Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" ( _
ByVal hwnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
ByRef lParam As Any) As Long
HAve u tried this code ? did it work for u?
I think this code will not work for external listview since at no point code is looking for a window that holds the listvidew!!
AS u see i provied the classname and listview info beleow so i be happy if u have a look at it.Thanks
This is the informaton i got from my external listview using api spy:
Window Handle == 0x00310520.
Class Name : SysListView32.
RECT.left == 799.
RECT.top == 195.
RECT.right == 995.
RECT.bottom == 462.
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long