MDI父母和子女表格 [英] MDI Parent and Child Forms
本文介绍了MDI父母和子女表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,我有一个父母Mdi表格和三个孩子表格
Hi all I have a parent Mdi form and three child forms
frmTrnDialog objTrnDialog = new frmTrnDialog();
objTrnDialog.Owner = this;
objTrnDialog.ShowDialog();
这是设置我的孩子表格的代码.但是如何使其完全适合父表单?
This is my code to set my child forms. But how to fit it perfectly inside parent form?
推荐答案
嗨
试试这个:
Hi
try this:
frmTrnDialog objTrnDialog = new frmTrnDialog();
objTrnDialog.show(this);
将其用于子表格:
use this for child form:
frmMain frm = this.Owner as frmMain;
(form parent = frmMain)
关键是,构成您公开的孩子的组件
祝你好运,
阿米尔(Amir)
(form parent=frmMain)
The point is, the components that form the Child You''re Public
good luck,
Amir
http://social.msdn.microsoft.com/Forums/zh-CN/csharplanguage/thread/e0985e8a-bbc1-48bb-afc0-f965f797c92d/ [ http: //stackstackflow.com/questions/2356337/c-how-to-show-a-child-form-within-a-mdi-container-form-which-its-windowstate [使用C#引入MDI表单 [
http://social.msdn.microsoft.com/Forums/en-US/csharplanguage/thread/e0985e8a-bbc1-48bb-afc0-f965f797c92d/[^]
http://stackoverflow.com/questions/2356337/c-how-to-show-a-child-form-within-a-mdi-container-form-which-its-windowstate[^]
Introduction to MDI Forms with C#[^]
这篇关于MDI父母和子女表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文