Results 1 to 3 of 3

Thread: trap Listview text from other application.

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2001
    Location
    india
    Posts
    10

    trap Listview text from other application.

    hi,
    Can any one help me to trap listview text from other application by passing window handle.

    thx
    PCM

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    What do you mean by "trap"?

  3. #3
    Lively Member
    Join Date
    Oct 2001
    Location
    Netherlands
    Posts
    115
    I guess you mean get the text from that listbox, maybe this works: (not tested)

    Const WM_GETTEXT = &HD
    Const WM_GETTEXTLENGTH = &HE
    Private Declare Function SendMessageStr Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As String) As Long
    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

    Function GetText(Handle As Long) As String
    Dim lngLen As Long, Str As String
    lngLen = SendMessage(Handle, WM_GETTEXTLENGTH, 0, 0)
    Str = Space(lngLen + 1)
    Call SendMessage(Handle, WM_GETTEXT, lngLen + 1, ByVal Str)
    GetText = Str
    End Function
    ICQ :137108715
    MSN Messenger : [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width