如何在不进行C#物理点击的情况下调用按钮的单击事件 [英] How to call a click event of a button without making a physical click in C#
本文介绍了如何在不进行C#物理点击的情况下调用按钮的单击事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想调用按钮的点击事件而不用手动点击它。
我试过但是我在对象e上收到错误。
有没有办法做到这一点。
I want to call a click event of a button without manually clicking it.
I tried but I am getting error on object e.
Is there any way to do this.
推荐答案
一些有用的链接看到它
http ://stackoverflow.com/questions/2390439/c-calling-a-button-event-handler-method-without-actually-clicking-the-button [ ^ ] br />
http://stackoverflow.com/questions/20058116/how-can-you-fire-the-button-click-event-without-actually-clicking-the-button [ <一个href =http://stackoverflow.com/questions/20058116/how-can-you-fire-the-button-click-event-without-actually-clicking-the-button\"target =_ blanktitle =New窗口> ^ ]
some helpful link see it
http://stackoverflow.com/questions/2390439/c-calling-a-button-event-handler-method-without-actually-clicking-the-button[^]
http://stackoverflow.com/questions/20058116/how-can-you-fire-the-button-click-event-without-actually-clicking-the-button[^]
PLease,请阅读:如何:在代码中模拟鼠标和键盘事件 [ ^ ]
PLease, read this: How to: Simulate Mouse and Keyboard Events in Code[^]
这篇关于如何在不进行C#物理点击的情况下调用按钮的单击事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文