如何在CLR中使用代码添加事件 [英] How to add an event with code in CLR

查看:78
本文介绍了如何在CLR中使用代码添加事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我想做的事的例子:
我有一个控件名称空间:example

Here is the example of what I want to do :
I have a control namespace:example

example^ a = gcnew example;
this->picturebox1->Controls->Add(a);


当我单击其他按钮时,该控件出现,并且我想添加一个单击事件函数来执行其他操作.
我需要写什么代码?


when I click on other button,the control appears and I want to add a click event function to do other thing.
What''s the code I need to write?

推荐答案

请参阅:
http://msdn.microsoft.com/en-us/library/4b612y2s%28v = vs.100%29.aspx [ ^ ].

—SA
Please see:
http://msdn.microsoft.com/en-us/library/4b612y2s%28v=vs.100%29.aspx[^].

—SA


这篇关于如何在CLR中使用代码添加事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆