When I try to get the text from this application it won't work, this is the code im using


public sub blah
Dim x As Long, editx As Long
x = FindWindow("#32770", vbNullString)
editx = FindWindowEx(x, 0&, "edit", vbNullString)
Dim TheText As String, TL As Long
TL = SendMessageLong(editx, WM_GETTEXTLENGTH, 0&, 0&)
TheText = String(TL + 1, " ")
Call SendMessageByString(editx, WM_GETTEXT, TL + 1, TheText)
TheText = Left(TheText, TL)
end sub

I put the following in a timer to see if it is getting anything and its not

call blah
text1.text = TL


Why won't it work?

thanks