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

c# - Binding a comma separated list to a List<int> in asp.net web api -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -