如何从其子窗体的父窗体MDI中启用控件 [英] How to enable a control in a parent form mdi from its child form

查看:80
本文介绍了如何从其子窗体的父窗体MDI中启用控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我当前正在设计一个应用程序,当加载父窗体时,除登录按钮外,所有控件都被禁用,以供用户登录.我希望每当用户登录时,以父形式启用控件(例如menustrip和toolstrip).

I am currently designing an app when the parent form is loaded all the controls are diabled apart from a login button for the user to login. i want that whenever a user login, the controls(e.g menustrip and toolstrip) in parent form to be enabled

推荐答案

http://social.msdn.microsoft.com/Forums/sr/csharpgeneral/thread/ec08b222-e6de-44c8 -a30b-fa79ea9676c0 [ ^ ]
http://www.c-sharpcorner.com /UploadFile/mma1979/how-to-access-mdiparent-controls-from-child-forms/ [
http://social.msdn.microsoft.com/Forums/sr/csharpgeneral/thread/ec08b222-e6de-44c8-a30b-fa79ea9676c0[^]
http://www.c-sharpcorner.com/UploadFile/mma1979/how-to-access-mdiparent-controls-from-child-forms/[^]


解决方案之一是添加父窗体控件中的ContainerContainerControl属性可以动态启用/禁用.这是有关组件容器的期刊文章: http://www.wiredprairie.us/journal/2004/05 /finding_the_component_containe.html [ ^ ]
One of the solution is to add a property ContainerControl in Parent form controls to be enabled/disabled dynamically. Here is the journal article about component containter: http://www.wiredprairie.us/journal/2004/05/finding_the_component_containe.html[^]


这篇关于如何从其子窗体的父窗体MDI中启用控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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