views:

22

answers:

1

Hi,

I'm running a java application from within a C# application. My goal is to fill a couple of input boxes inside the java app automatically using the C# code.

I assume the java application uses Swing for its UI. I've tried using SendMessage and WM_KEYDOWN but nothing happens. Since it's a swing app, the input doesn't have a handle, so I'm using the handle of the entire window.

Any idea how this can be done?

Thanks!

A: 

Try sending WM_CHAR with a character to see if that works.

If it doesn't you could use Spy++ to see what messages are being sent.