Create Animated Button

前端 未结 2 1131
日久生厌
日久生厌 2021-02-04 19:02

I have button it possible create animate on click?

\"enter

with photoshop i have c

2条回答
  •  伪装坚强ぢ
    2021-02-04 19:56

    A timer is not required using a GIF.

    Using windows forms you could start by creating an animated GIF for each button. It would have to include both the forward and backwards direction. You can do this through Photoshop via the "Animation" panel. On the PictureBox click event you can set the image to play or stop.

    The code below would set your image on the beginning frame.

    imgButtonDimension = new FrameDimension(imgButtonDimension.FrameDimensionsList[0]);
    imgButton.SelectActiveFrame(imgButtonDimension, 0);
    pictureBox.Image = imgButton;`
    

    If this is the approach you'd like to take I can provide further elaboration.

提交回复
热议问题