从基类调用继承形式的函数 [英] calling function of inherited form from base class

查看:120
本文介绍了从基类调用继承形式的函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好我已经在vb.net中创建了mdi windows应用程序,我创建了一个基类表单,从该基类我使用继承创建了许多子表单。我在继承的子窗体中有一些功能,我需要在我的基类事件触发后调用该函数。我可以执行此任务..



示例代码将感谢我

hi all i have created mdi windows application in vb.net , i created one base class form, from that base class i am creating many child form using inheritance. i have some function in my inherited child form , i need to call that function once my base class event fired.how i can do this task..

Example code will be grateful to me

推荐答案

在子类实例中触发基类事件。



所以,你可以为你的子类事件添加一个处理程序。

The base class event is fired in a child class instance.

So, you may add a handler to your child class event.
AddHandler ChildForm.MyEvent, AddressOf ChildForm.SomeFunction


这篇关于从基类调用继承形式的函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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