Posted on 2005-04-13
I have created a little app, that will find a window then find the controls on that form.
I can find the window fine, but i have two text boxes on the form, and of course the class name is thundertextbox well , i have to text boxes, i am able to get the text from the text2 box but how do i make it get the text from the text1 box? I seems to only get text from the text box with the highes number.. I know you can put the text in the vbnullstring area BUT they don't contain text so both are blank .
Dim mystr As String * 255
'the below will find multiple of same class names
fwin = FindWindow(vbNullString, "Form1")
fwin1 = FindWindowEx(fwin, 0, "thundertextbox", vbNullString)
'now sendmessage to get the text
Call SendMessage(fwin1, WM_GETTEXT, 255, mystr)
Label1.Caption = mystr