Click to See Complete Forum and Search --> : Inputting to another form


Chrispy360
August 18th, 2009, 07:45 AM
Is there a easy way to input a string or integer into another exe's textbox for example, if i wanted to write into the textbox on the windows calculator '3'. Can someone please give an example code and if you dont mind could you explain what does what in the code.

Thanks in advance
Chris

Shuja Ali
August 18th, 2009, 01:39 PM
Get the handle of the main window and then get the handle of the Text Box. You can then use SendMessage API to send the specific text to the text box. These two thread will give you an idea of how to do it
http://www.codeguru.com/forum/showthread.php?t=479877
http://www.codeguru.com/forum/showthread.php?t=422833&highlight=SendMessage

Also there are number of threads in C# forum too, those will be helpful too.