110,545
社区成员
发帖
与我相关
我的任务
分享
public class NetChart : UserControl
{
private PictureBox _PictureBox;
public NetChart()
{
_PictureBox = new PictureBox();
_PictureBox.Dock = DockStyle.Fill;
_PictureBox.MouseClick += MyMouserClick;
this.MouseClick += MyMouserClick;
this.Controls.Add(_PictureBox);
}
private void MyMouserClick(object sender, EventArgs e)
{
MessageBox.Show(sender.GetType().Name);
}
}