C# - Image as a clickable button

后端 未结 2 1251
野趣味
野趣味 2021-02-13 13:07

I want to make some custom controls, with images as buttons. I don\'t want images ON buttons - I want to totally replace the button with an image read from a file. Is it possibl

相关标签:
2条回答
  • 2021-02-13 13:39

    You could use the image in the Button's BackgroundImage and change the FlatStyle to flat, and the colors of FlatAppearance MouseDownBackColor & MouseOverBackColor to transparent. It should look the same as a normal picture/picturebox with properties and events of a Button.

    0 讨论(0)
  • 2021-02-13 13:41

    You can use the PictureBox control and use the Click event on it to handle clicks.

    0 讨论(0)
提交回复
热议问题