C# 单击事件不从使用graphicsPath绘制的usercontrol触发

C# 单击事件不从使用graphicsPath绘制的usercontrol触发,c#,winforms,user-controls,graphicspath,C#,Winforms,User Controls,Graphicspath,我使用graphicspath创建了一个usercontrol。当我在我的主winform类中分配一个click事件时,当点击usercontrol时它不会触发。我认为这和usercontrol的区域有关,所以我用我形状的graphicspath创建了一个新区域。我看不出它没有开火的其他原因。我错过了什么 那么处理者是谁?真的吗?我用OnPaint方法而不是我自己的方法修复了它,所以处理程序是?真的吗?我用OnPaint方法而不是我自己的方法修复了它 public abstract class

我使用graphicspath创建了一个usercontrol。当我在我的主winform类中分配一个click事件时,当点击usercontrol时它不会触发。我认为这和usercontrol的区域有关,所以我用我形状的graphicspath创建了一个新区域。我看不出它没有开火的其他原因。我错过了什么


那么处理者是谁?真的吗?我用OnPaint方法而不是我自己的方法修复了它,所以处理程序是?真的吗?我用OnPaint方法而不是我自己的方法修复了它
public abstract class BaseShape : UserControl
{
    protected void DrawFill(PaintEventArgs e)
    {
        GraphicsPath path = CreatePath();
        e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
        using (SolidBrush brush = new SolidBrush(Fill.Color))
        {
            e.Graphics.FillPath(brush, path);
        }
        this.Region = new Region(path);
    }
}

public partial class Circle : BaseShape
{
    protected override GraphicsPath CreatePath()
    {
        GraphicsPath path = new GraphicsPath();
        path.StartFigure();
        path.AddEllipse(Contour.Weight, Contour.Weight, this.Width - 2 * Contour.Weight, this.Height - 2 * Contour.Weight);
        this.Region = new Region(path);
        return path;
    }
}

public partial class Main : Form
{
    private void Circle1_Click(object sender, EventArgs e)
    {
        MessageBox.Show("tnjek");
    }
}