Q-bertsuit
Q-bertsuit

Reputation: 3437

Change button image size in winforms app

Im trying to make the Icon on a button smaller, but I can't figure out how.

enter image description here

The size of the image is grayed out.

enter image description here

Any idea how to fix this?

Upvotes: 7

Views: 17919

Answers (1)

Romano Zumbé
Romano Zumbé

Reputation: 8099

You need to resize the Image and then set it as the ButtonsImage:

// where 'MyImage' is the Image to display on the Button
this.Button1.Image = (Image)(new Bitmap(MyImage, new Size(32,32)));

Upvotes: 12

Related Questions