Guest mcerk Posted May 26, 2002 Posted May 26, 2002 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. Quote
*Gurus* divil Posted May 26, 2002 *Gurus* Posted May 26, 2002 You can use the Image constructor to change the size of an image. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Guest mcerk Posted May 29, 2002 Posted May 29, 2002 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 :-\ Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.