Interact with other desktop-applications in windows using C# winforms

空扰寡人 提交于 2020-01-01 10:43:50

问题


I was wondering if its possible to interact with other programs someone with my program. For example clicking a button on another program etc. etc. I'm not sure if this is even possible but if it is could someone provide a little sample code in C#.

Thanks


回答1:


You can use UI Automation to interact with other applications.




回答2:


You could just create and send messages to the other process. You will have to use P/Invoke for this from C# code.

Here is some code that should point you into the right direction.



来源:https://stackoverflow.com/questions/912879/interact-with-other-desktop-applications-in-windows-using-c-sharp-winforms

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!