Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: 从函数调用按钮 OnClick
我想自动执行按钮单击事件。我想要按钮单击事件的代码,而无需手动单击按钮。
我认为您正在寻找Button.PerformClick();
button1.PerformClick();
我有两件事要说: