可以這麼些代碼(經典總結):
//button1的單擊事件
private void button1_click(object sender, system.eventargs e)
{
//代碼過程
}
//在button2的單擊事件中調用button1的單擊事件
private void button2_click(object sender, system.eventargs e)
button1_click(sender,e);
}
本文轉自terryli51CTO部落格,原文連結:http://blog.51cto.com/terryli/520859 ,如需轉載請自行聯系原作者