need to get the classid of the form and the listview replace the notepad and edit with thoose.
VB Code:
Option Explicit
Private Const WM_GETTEXT As Long = &HD
Private Const WM_GETTEXTLENGTH As Long = &HE
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Integer
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Integer, _
ByVal hWnd2 As Integer, _
ByVal lpsz1 As String, _
ByVal lpsz2 As String) As Integer
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Integer, _
ByVal wMsg As Integer, _
ByVal wParam As Integer, _
ByVal lParam As String) As Integer
Private Sub Form_Load()
Dim hwndl As Integer
Dim hwndEx As Integer
Dim intlen As Integer
Dim buffer As String
hwndl = FindWindow("Notepad", vbNullString)
'gets handle of 'edit' area of notepad
hwndEx = FindWindowEx(hwndl, 0, "edit", vbNullString)
intlen = SendMessage(hwndEx, WM_GETTEXTLENGTH, 0, vbNullString)
buffer = Space$(intlen)
SendMessage hwndEx, WM_GETTEXT, intlen, ByVal buffer
MsgBox buffer
End Sub