1

I have winform project in c#. I want to draw shapes (especially trapezoid area) and make them all clickable. So I decided to create custom shape button(so it will be automaticly clickable).

I have searched and found rounded, rectangle and circle buttons but i couldn't find any example of trapezoid buttons.

How can i create trapezoid button or can anyone suggest another method to make the drawn shape is selectable or clickable?

Note: I have corner coordinates of the trapezoidal area.

enter image description here

Gokhan
  • 453
  • 4
  • 10
  • 1
    https://learn.microsoft.com/en-us/dotnet/api/system.drawing.graphics.drawpolygon?view=dotnet-plat-ext-6.0 – klekmek Aug 31 '22 at 10:55
  • 1
    Did you try Code Project? https://www.codeproject.com/script/Content/Tag.aspx?tags=custom-controls – jdweng Aug 31 '22 at 11:19
  • 1
    Read the notes here: [How to draw a shape using GraphicsPath to create the Region of a Custom Control?](https://stackoverflow.com/a/69075782/7444103) – Jimi Aug 31 '22 at 12:15
  • So many thanx everybody. I will try to draw shape using Form paint event. When the user cursor position intersects with polygon the color and brush will change. So this will also show selectable. – Gokhan Aug 31 '22 at 12:35

0 Answers0