图片控件 pic;
按钮控件 button1,button2
按钮点击代码
private void button_Click(object sender, EventArgs e)
{
if (sender.Equals(button1))
{
pic.Load("pic\\girl1.jpg");
}else
{
pic.Load("pic\\girl2.jpg");
}
}
(注意要在界面初始化代码中修改
this.button1.Click += new System.EventHandler(this.button_Click);
this.button2.Click += new System.EventHandler(this.button_Click);
)