MDI父母与母亲孩子 [英] MDI Parent & child

查看:64
本文介绍了MDI父母与母亲孩子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个主屏幕窗体,它是我的应用程序的.......主屏幕,大声笑.当打开子窗体时,将应用mdi设置,但是当我全屏显示子窗口时,该图标将位于主菜单栏上方.

I have a mainscreen form that is the................main screen of my app, lol. When opening a child form the mdi settings are applied, but when I full screen the child window the icon goes above the main menu bar.

按钮代码:

 ipscanner.MdiParent = My.Forms.MainScreen
 ipscanner.Show()


但是一旦我最大化表单,它就会执行以下操作:


But once I maximize the form it does this:

推荐答案

瑞安,

我尝试制作一个示例进行测试,但效果很好,请注意,您可以设置ParentForm的 IsMdiContainer 属性设置为true,其WindowsState属性设置为true Maximized.

I try to do a sample to test it, and it works fine, please notice that you could set ParentForm's IsMdiContainer property to true, and its WindowsState property to Maximized.

并参考下面的代码.

Protected Sub MDIChildNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click  
   Dim NewMDIChild As New Form2()  
   'Set the Parent Form of the Child window.  
   NewMDIChild.MdiParent = Me  
   'Display the new form.  
   NewMDIChild.Show()  
End Sub  

有关更多详细信息,请参考 如何创建MDI子表单.

希望对您有帮助.

About more detailed info, please refer to How to create MDI Child Forms.

Hope it is helpful to you.

最好的问候,

樱桃


这篇关于MDI父母与母亲孩子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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