在按钮中旋转图像

时间:2017-02-21 18:38:55

标签: c#

我想在里面的图像同时旋转整个按钮。 我使用此代码将我的按钮向左旋转。

 int y = button1.Size.Width; //i'm taking  position y
 int x = button1.Height;     //i'm taking  position x
 button1.Size = new Size((x+y)-y , (x + y) - x); //now i rotate it

但内部的图像保持不变。 如何使用按钮同时旋转图像。我怎样才能拍摄图像位置。(我的意思是如果旋转或不旋转)

1 个答案:

答案 0 :(得分:0)

使用此技术: button1.Image.RotateFlip(((RotateFlipType.Rotate90FlipXY));