picturebox中添加图片

 1 private void Form1_Load(object sender, EventArgs e)
 2         {
 3             radioButton2.Checked = true;
 4         }
 5         private void radioButton_CheckedChanged(object sender, EventArgs e)
 6         {
 7             if (radioButton2.Checked == true)
 8             {
 9                 pictureBox1.ImageLocation = @"C:\111.jpg";
10             }
11             else
12             {
13                 pictureBox1.ImageLocation = @"C:\000.jpg";
14             }
15 
16         }
View Code

插入图片最简单的代码pictureBox1.ImageLocation = @"C:\111.jpg";

不同情况插入不同图片

posted @ 2014-12-28 10:15  xzh1993  阅读(1286)  评论(0编辑  收藏  举报