namespace WinFormsApp1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
var picture = new PictureBox
{
Name = "pictureBox",
Size = new Size(250, 200),
Location = new Point(180, 150),
Image = Image.FromFile("d:\\test.jpg"),
};
this.Controls.Add(picture);
}
}
}
/*
run:
*/