如何获得Active MDIChild对象 [英] How to get Active MDIChild object

查看:93
本文介绍了如何获得Active MDIChild对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我需要帮助,如何确定其他类中未与父级或子级链接的活动MDIChild objec?

我尝试使用以下代码,但pParent返回为NULL.

Hello,

I need help in how to determine an active MDIChild objec from other class which is not linked with niether Parent nor Child?

I have tried with below code, but pParent is return as NULL.

 MDIParent pParent = MDIParent.ActiveForm as MDIParent;
if (pParent == null) return;
MDIChild pChild = pParent.ActiveMdiChild as MDIChild;



我是C#新手,所以在了解我要去哪里的地方时需要帮助.

感谢您的帮助.



I need help in knowing where I am going wrong here as I am new to C#.

Thanks for the help.

推荐答案

这将为您提供所需的答案.
在winform应用上获取活动MDI子窗体 [ ^ ]

请记住标记我的答案并投票支持,如果它有助于解决您的问题.

问候
This will have the answer you looking for.
Get Active MDI Child form at winform app[^]

Please remember to mark my answer as well as vote for it if it helps solve your problem.

Regards,


这篇关于如何获得Active MDIChild对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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