update workshop 2 for resizing
This commit is contained in:
@@ -26,6 +26,8 @@ namespace workshop2
|
||||
{
|
||||
openFileDialog1.ShowDialog();
|
||||
pictureBox1.Load(openFileDialog1.FileName);
|
||||
//pictureBox1.Size = pictureBox1.Image.Size;
|
||||
pictureBox1.SizeMode = AutoSize(true);
|
||||
}
|
||||
|
||||
private void quitButton_Click(object sender, EventArgs e)
|
||||
@@ -49,5 +51,13 @@ namespace workshop2
|
||||
pictureBox1.Image = image;
|
||||
pictureBox1.Refresh();
|
||||
}
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.MinimumSize = new System.Drawing.Size(this.Width, this.Height);
|
||||
this.MaximumSize = new System.Drawing.Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
|
||||
this.AutoSize = true;
|
||||
this.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user