picture size and strach

  • Thread starter Thread starter mcerk
  • Start date Start date
M

mcerk

Guest
picturebox

is it possible, to fit a picture to a picturebox without straching it?

I want to maintain proporcions, and change the size of the picture.
 
Hi, I posted this post on .net forum and I'm not sure that I posted it into right forum

anyway

is it possible, to fit a picture to a picturebox without straching it?



I want to maintain proporcions, and change the size of the picture.

Divil told me to use Image Constructor to change size of the picture.


I solved this problem in VB6 by using 2 pictureboxes
picturebox1 (hidden, it adjusted to the picture size)
picturebox2(visible, had strech property on)

I loaded picture into hidden form and figured out the size of image in pixels (=size of hidden form). Then I changed the size of the picturebox1 that I maintained proportions of the picture and loaded this picture into it.

The only problem was, that this procedure vas VERY slow. I have quite large pictures, so loading every one, just to figure out it's size was waste of time.



Is there any faster procedure in vb.net?


PS, I looked into help for Image constructor, but I didnt get the point..


tx.


Matej


:-\
 
Back
Top