开发者

how to create triangular button in c#

How to cre开发者_JS百科ate Custom shaped buttons in c#: say triangular


You could use a pictureBox as a button.


Easiest way is to set a tringular image on the button, with transparent areas outside the triangle.

As others have suggested, you could also use a PictureBox object as a button and handle the "click" even of it.

Another way is probably to write a TriangleButton class that extends the Button class, then override the Paint method so that you can draw a triangle instead of the regular button shape. Not sure how to handle the "click" areas of the button (you might still have a a rectangular click region).


You create a rectangular ImageButton with a transparent background.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜