winapi - C# about sending simulated keyboard events to another APP -


    private void button3_click(object sender, eventargs e)     {             setforegroundwindow(wndhandle);             sendkeys.sendwait("123");     } 

i use win32 api ,use sendkey achieve target,but using sendkey has disadvantage "i have setforegroundwindow() before use sendkey",it doesn't match wish.

i want click button in gui c# created, , simulate keyboard event app, , important of all, wish don't have set window of app ground window.

does have idea how it? appreciate much.

does target application must active?


Comments

Popular posts from this blog

swift - Button on Table View Cell connected to local function -

dns - Dokku server hosts two sites with TLD's, both domains are landing on only one app -

c# - ajax - How to receive data both html and json from server? -