vb.net中MDI子窗体对其父窗体属性的获取与修改 vb.net中MDI子窗体对其父窗体属性的获取与修改 Class MDIChildForm ....... 'set mnuEditPaste & toolScan cannot be seen private sub setMDIMnuToolUnvisible() '***************************************' ' first method you can set a menuitem to be unvisible' '***************************************' 'this method you could not control one MenuItem 'you can only set a group of menuitems me.MdiParent.Menu.Menuitems(0).visible = False 'set the first group menuitem can not be seen 'with this method you have not right to modify toolScan dim frmMdi as MDIForm if tyhpeof me.MdiParent is MDIForm frmMdi = DirectCast(me.Mdiparent, MDIForm)'get the instantce of me.MdiParent ; 'then you should access all the members of class MDIForm without private members frmMdi.mnuEditPaste = False frmMdi.toolScan = Flase 'like this you could do everything with MDIForm you want end if end sub end Class 作者:wqvbjhc 出处:https://www.cnblogs.com/wqvbjhc/ 版权:本文版权归作者和博客园共有 转载:欢迎转载,但未经作者同意,必须保留此段声明;必须在文章中给出原文连接;否则必究法律责任