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
Post a Comment