resize label image

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.
 
S

Steve Whine

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.
 
S

Steve Whine

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?
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top