开发者

click on a button in another application from my C# application?

I want to click on a button in another application from my C# application ,

and I don't have the source code for the application that contains the button

let us开发者_如何学JAVA say as an example ...can I use windows calculator from my application by clicking its buttons Programmatically

I am using c# and .NET

I think I must use windows api to do this

does anybody have any idea????


Yes, it's not too complicated. You can use FindWindowEx to get the window handle, then iterate through the windows elements and use sendmessage or postmessage to send the WM_Click message.

Here's a codeproject project that does exactly what you want.

Code project

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜