Apply new colour (with Gradient) to Win Forms button onClick

后端 未结 2 1043
长情又很酷
长情又很酷 2021-01-16 08:01

I\'ve come across several methods of applying gradient styles to objects in a windows form application. All the methods involve overriding the OnPaint method. However, I am

2条回答
  •  北荒
    北荒 (楼主)
    2021-01-16 08:29

    As you've seen, you need to handle the Paint event.

    You can set a boolean in your class to indicate whether to draw the gradient or not.

提交回复
热议问题