resize label image

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a .jpg image that I use in another application. It represents our
company logo and I want to place it in form. But the image is way to large.
Is there a way in .net window forms to shrink the image to fit into size of
window that I have designated in a label object. Or is there another object I
should use to accomplish this, I tried picture but that didn't help. Or do I
have to find some other program and shrink it until I get desired size and
then save and use that result in my program.
 
brian_harris said:
I have a .jpg image that I use in another application. It represents our
company logo and I want to place it in form. But the image is way to large.
Is there a way in .net window forms to shrink the image to fit into size of
window that I have designated in a label object. Or is there another object I
should use to accomplish this, I tried picture but that didn't help. Or do I
have to find some other program and shrink it until I get desired size and
then save and use that result in my program.

Checkout the SizeMode property of the PictureBox control.
 
On my system (VS.Net 2005), setting the SizeMode property to
'StretchImage' scales the image as I resize the control. What are you
setting the SizeMode property to?
 
You are correct, I was using the wrong value, I tried using autosize, but
when I used stretch, it did shrink it, but not very good. I have been
playing with microsoft office picture and resizing using that produced a much
better picture. So whatever logic .net forms uses is not as good as
microsoft office picture.

Thanks for your help
 
Back
Top