views:

27

answers:

2

I have a picture in jpg format and size 765X368.

I need to use this picture for button and pictureBox on my form.

When I use for pictureBox I use Sizemode = StretchImage and I see it excellent, but when I use it for my button, it's very big and bad!!!

How I can make smaller this picture (automatic) when I load it to my button?

+1  A: 

You could resize your image on the fly before using it in your button. See a code sample at http://snippets.dzone.com/posts/show/4336 .

Andreas Paulsson
A: 

Experiment with other options of SizeMode for button. In general it's always better to have two different images for a full view and for a button.

One more tricky thing about buttons is that they tend to... move the picture a little bit to the left or to the right, and it all looks not the way you would like it.

26071986