Wednesday 21 September 2011

How do you strech a picture within a visual basic picture box?

I load the an image into a picture box through the code. I want to strech the image so that it will fill up the entire picture box i have set for it. No i don't want the box to change size but the dimensions of the picture.
How do you strech a picture within a visual basic picture box?
What VB are you using? In VB.Net...

In the properties window set the %26quot;stretch Image%26quot; = true

During runtime...



PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage
How do you strech a picture within a visual basic picture box?
The picture is an object. You should be able to select it and drag a side or a corner.
In the properties window, there is an option labeled, %26quot;Stretch%26quot;.

Set it to %26quot;True%26quot;.