Question how to use of spy++ (64bit) and vb.net to link other application window\textbox\

alokmpatel

Member
Joined
Dec 20, 2014
Messages
6
Programming Experience
Beginner
Hello every one.
i am using spy++(64 bit) to find window handle, class etc..etc.
lets say i have user form name: Form1
in this there is a text box name: TextBox1
and one button name: Button1

now i have one other application and spy result is as follow (refer attachments)
window handle: 00070766
instant handle: 72940000
class: ThunderRT6TextBox
process id: 00000FF0
Thread ID 00001AC8




now i want to write text in this other application's window 00070766 = TextBox1.text


it is possible??
please help..
thanks in advance..
Alok.
 

Attachments

  • form.png
    form.png
    3.4 KB · Views: 37
  • properties-class.png
    properties-class.png
    9.9 KB · Views: 35
  • properties-general.png
    properties-general.png
    9.7 KB · Views: 32
  • properties-process.png
    properties-process.png
    5.7 KB · Views: 35
  • properties-style.png
    properties-style.png
    9 KB · Views: 36
You don't really use Spy++ to find the window handles in this particular case because, the next time you run these apps, the handles will be different. What you need to do is use Spy++ to find the hierarchical structure of windows within that application. At run time, you will need to call the FindWindow API function to get the handle of the top-level window by text and/or type. You can then use the FindWindowEx API function one or more times to get the handle of the child window you want to affect. Finally, you will use the SendMessage API function to actually affect the child window. Specifically, you will be sending the WM_SETTEXT message. This is a very common scenario when using the Windows API so a web search of suitable terms will yield plenty of examples.
 
Back
Top