Use the FindWindow API to get the handle of the window then use the following function to retrieve the text:
VB Code:
Public Declare Function FindWindow Lib "user32" &_ Alias "FindWindowA" (ByVal lpClassName As String, ByVal &_ lpWindowName As String) As Long Public 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 Public Function GetText(Window As Long) As String Dim Cursor As String, Text As Long Text& = SendMessage(Window&, WM_GETTEXTLENGTH, 0&, 0&) Cursor$ = String(Text&, 0&) Call SendMessageByString(Window&, WM_GETTEXT, Text& + 1, Cursor$) GetText$ = Cursor$ End Function




Reply With Quote