0

I have a program that sets the image from a link , to a picture box.

For example:

pictureBox1.Load("http://www.e357.net/wordpress/beingernest/wp-content/uploads/2010/07/questionmark-150x150.jpg");

But since the pictureBox size is 100x100, the image gets cut down.

How can i resize the image, without changing the pictureBox size?

Im using WinForms.

Thanks.

1 Answers1

0

You can just change your pictureBox1.SizeMode to achieve that behavior.

In your case

pictureBox1.SizeMode = PictureBoxSizeMode.Zoom;

and

pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;

should work.

Leon Husmann
  • 664
  • 1
  • 6
  • 25