C#,Winform 自定义控件,自定义事件,怎么处理?
C#,Winform 自定义了一个控件Uc_ControlBase并自定义了事件ue_pressenter,现在需要达到这样的效果... ...
1、从控件Uc_ControlBase继承一个控件Uc_Control,并在事件ue_pressenter里写代码 MessageBox.show("Uc_Control");
2、然后将Uc_Control控件拖到窗体上:
A:怎样重载事件ue_pressenter里的代码并写上代码: MessageBox.show("OverloadsForm1");
B:怎样覆盖事件ue_pressenter里的代码并写上自己的代码: MessageBox.show("OverridesForm1");
请高手最好给个例子... ...