How to: tell pixel size of graphic image (i.e. jpg) to resize picbox

The picturebox control supports image types of bmp, gif, ico, jpg, jff, wmf, emf.

How do I:

1) Find out the pixel size of these images?

2) Resize my picturebox if it's pixel size is to small to fully accommodate the image?

Many, many thanks!!!

Gary (vbn)


  • I believe you can try this:


    'Autosize' causes the picturebox size to be made equal to the size of the image.This way ,you don't need to know the size of the image beforehand.

    On the other hand,to make the image size equal to the picturebox size,you can use PictureBoxSizeMode.StretchImage.This will adjust the image size and make it equal to the picturebox size.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion