给picturebox控件写一个click事件 为何没反应

给picturebox控件写一个click事件 为什么没反应[解决办法]public class tank : PictureBox{public delegat

给picturebox控件写一个click事件 为什么没反应

                            
[解决办法]
public class tank : PictureBox
        {
            public delegate void mykprs(object sender, MouseEventArgs e);
            public event mykprs yourkeypress;
            protected override void OnMouseClick(MouseEventArgs e)
            {
                if (yourkeypress != null)
                    yourkeypress(this, e);
                base.OnMouseClick(e);
            }
        }