Interact with other desktop-applications in window

2020-07-11 06:58发布

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

2条回答
▲ chillily
2楼-- · 2020-07-11 07:27

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.

查看更多
神经病院院长
3楼-- · 2020-07-11 07:34

You can use UI Automation to interact with other applications.

查看更多
登录 后发表回答