日期:2014-05-20  浏览次数:20920 次

如何在mainForm里面调用subForm的private button事件?
有两个Form,   mainForm和subForm,   subForm里面有一个submitButton,   是private的,   现在我在mainForm里面new了一个subForm,   想在mainForm里面控制submitButton的实现,   有什么办法呢?

谢谢

------解决方案--------------------
I see, you can keep the "new " fuction still in MainForm,but move "Button Method "to the SubFormBase which I just talked about.just try. Sorry to type En,I just find that I can 't type Chinese.
------解决方案--------------------
参看:
http://blog.csdn.net/knight94/archive/2006/03/18/628285.aspx
http://blog.csdn.net/Knight94/archive/2006/08/22/1104957.aspx

第一篇写得比较早,后一篇提到了委托方法,你可以参看。