tags:

views:

117

answers:

1

So, I was just wondering how I could enter text into a text box on a web page with a windows application.

Almost like a reverse screen scrape.

I know I have read somewhere about being able to do this but, I completely forgot how he did it. I think he may have been using Win32 DLLs which might be a fun endeavor but, getting off-topic now.

So, the question is: How can you inject text into text boxes that don't belong to your application with .NET (C#)

EDIT: Found my answer. See comments below.

+2  A: 

Have a look at SendInput Win32 API. You'll need to focus on the correct window first, naturally. Also, it has some security restrictions on Vista and above, so that a low-privilege application cannot manipulate another one with higher privileges.

Pavel Minaev