c#的formload里怎么触发按钮的点击事件?
powerbuilder里直接cb_1.triggerevent(clicked!)就可以触发按钮cb_1的点击事件,在c#里怎么实现?
------解决方案--------------------
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show(e.ToString());
}
private void Form1_Load(object sender, EventArgs e)
{
button1_Click(sender, e);
}
------解决方案--------------------3L 正解
button1_click(sender, e); 就这样触发
------解决方案--------------------Button1.PerformClick();