屏蔽Tracked事件

private void frmmain_Load(object sender, EventArgs e) { //建立连接,connect axSuperMap1.Connect(axSuperWorkspace1.CtlHandle); this.Initfrm(RManager); // axSuperMap1 .Tracked +=new EventHandler(axSuperMap1_Tracked); if (caod !=null) { axSuperMap1.Tracked +=new EventHandler (caod); } } public event cao caod; public delegate void cao(object sender, EventArgs e);

外面使用的代码为:

  private void button1_Click(object sender, EventArgs e) { frmmain f = new frmmain(); f.caod += new frmmain.cao(f_caod); f.caod -= new frmmain.cao(f_caod); f.Show(); } void f_caod(object sender, EventArgs e) { }

你可能感兴趣的:(屏蔽Tracked事件)