我在c#中编写下面的代码来显示图像PictureBox但是在运行应用程序时,没有显示任何内容......
请帮我解决这个问题.
这是我的代码:
private void button1_Click(object sender, EventArgs e)
{
PictureBox p =new PictureBox();
p.ImageLocation = "1.jpg"
p.Location = new Point(100, 75);
}
Run Code Online (Sandbox Code Playgroud)
PictureBox.Image = new Bitmap("yourImage.jpg");
Run Code Online (Sandbox Code Playgroud)
支持的格式是: BMP, EMF, EXIF, GIF, ICON, JPEG, PNG, TIFF and WMF.