¿Estás colocando esto en el evento
Load del Form?:
Código PHP:
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
Private Sub Form_Load()
Dim lhWnd As Long
'Obtenemos el hwnd del encabezado del ListView'
lhWnd = FindWindowEx(ListView1.hwnd, 0, "SysHeader32", vbNullString)
'Cambiamos el procedimiento para interceptar los mensajes'
ChangeWindowProc lhWnd
End Sub
¿Cuando llamas a FindWindowEx te está devolviendo algún valor en lhWnd?