首页 > 代码库 > picturebox中添加图片

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             else12             {13                 pictureBox1.ImageLocation = @"C:\000.jpg";14             }15 16         }
View Code

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

不同情况插入不同图片

picturebox中添加图片