I need to know how I can send a message to any text box of windows.
If a focus the google chrome url textbox, then I will "auto paste" the message, or if I focus a Word Document string, or notepad, or anything!
I got a code ho sends by setting the iHwnd, findwindow and findwindowex, but I need to set any time I want to change the final program, and thats why I need an automatic program "focus based".
Here is what I have so far...
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim iHwnd As IntPtr = FindWindow("notepad", vbNullString)
Dim iHwndChild As IntPtr = FindWindowEx(iHwnd, IntPtr.Zero, "Edit", vbNullString)
SendMessage(iHwndChild, WM_SETTEXT, 0, "Hello World!")
End Sub
Sorry for my bad english!