non rectangular control
-
Hi there. I have the following problem: I need to make a control that has an irregular shape. So far so good - I have no problem drawing it using something like this: Private Sub TabPage4_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles TabPage4.Paint Dim myPointArray As Point() = {New Point(50, 50), New Point(100, 120), New Point(140, 100)} Dim MyGraphics As Graphics = e.Graphics Dim MyPen As New Pen(Color.Azure, 2) Dim mySolidBrush As New SolidBrush(Color.Aqua) myGraphics.DrawClosedCurve(myPen, myPointArray) MyGraphics.FillClosedCurve(mySolidBrush, myPointArray) End Sub So now I have drawn part of the control. The problem comes when I try to raise an event regarding the irregular shape I've drawn, not the ractangle containing it. Can anyone help me with an idea, or maybe a hole new different approach to make such a control?