Smith
Smith

Reputation: 5961

manipulate another app embedded webbrowser

I need to fill form in a web browser control embedded in another app.

I know I'll have to use API to get the window handle of the other app, but don't know which API can get reference to the web browser control inside that app.

How do I go about this?

Upvotes: 1

Views: 78

Answers (1)

PhonicUK
PhonicUK

Reputation: 13864

If you know that the other application is a managed (.Net) application - then you can do it via DLL injection. There's a decent tutorial on doing this with C# at http://www.codingthewheel.com/archives/how-to-inject-a-managed-assembly-dll

Once you've got your DLL injected, it'll need to use reflection to find the web browser control, and then invoke its methods to fill in the form.

Alternatively, you could just focus the window and use sendkeys to simulate keyboard input that would fill in the form.

Upvotes: 1

Related Questions