窗体包含窗体--MDI多文档界面-创新互联
创建父窗体form1:
创新互联从2013年成立,我们提供高端网站建设、小程序设计、电商视觉设计、手机APP定制开发及网络营销搜索优化服务,在传统互联网与移动互联网发展的背景下,我们坚守着用标准的设计方案与技术开发实力作基础,以企业及品牌的互联网商业目标为核心,为客户打造具商业价值与用户体验的互联网+产品。注意: 1).IsMIdContainer属性改为true(默认为false)--获取或设置一个值,该值指示窗体是否为多文档界面 (MDI) 子窗体的容器
创建子窗体formchid1,formchid2,formchid3,formchid4,在父窗体form1中创建4个按钮button1,button2,button3,button4 分别打开上面4个子窗体
3.父窗体部分代码:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
formchid1.MdiParent = Me
'formchid1.TopLevel = False
'formchid1.Parent = Me
formchid1.Dock = DockStyle.Fill
formchid1.Show()
formchid1.BringToFront()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
formchid2.MdiParent = Me
'formchid2.TopLevel = False
'formchid2.Parent = Me
formchid2.Dock = DockStyle.Fill
formchid2.Show()
formchid2.BringToFront()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
formchid3.MdiParent = Me
'formchid3.TopLevel = False
'formchid3.Parent = Me
formchid3.Dock = DockStyle.Fill
formchid3.Show()
formchid3.BringToFront()
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
formchid4.MdiParent = Me
'formchid4.TopLevel = False
'formchid4.Parent = Me
formchid4.Dock = DockStyle.Fill
formchid4.Show()
formchid4.BringToFront()
End Sub
创新互联www.cdcxhl.cn,专业提供香港、美国云服务器,动态BGP最优骨干路由自动选择,持续稳定高效的网络助力业务部署。公司持有工信部办法的idc、isp许可证, 机房独有T级流量清洗系统配攻击溯源,准确进行流量调度,确保服务器高可用性。佳节活动现已开启,新人活动云服务器买多久送多久。
新闻标题:窗体包含窗体--MDI多文档界面-创新互联
网站地址:http://azwzsj.com/article/dgphch.html