What I'm trying to do is for example, click a button on the program and have the program send a keystroke to another program that is not the active window. So far all I have is this

SendKeys.Send("TEST");

This works fine if the program I want to send the keystrokes to is the active window, however I want to be able to send it to a non active window does anyone have any recommendations?

Thanks

Recommended Answers

All 2 Replies

SendKeys sends to the active application so, if the app you want to send to is focused it should be sending to it.

SendKeys sends to the active application so, if the app you want to send to is focused it should be sending to it.

and it does, I guess I'm looking for a way to quickly switch the active window from

current active window --> target window --> back to "current active window"

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.