问题描述
我想从孩子那里打电话给孩子。
但是每当我打电话给它时都不适合这个区域。
我用过MDIParent作为主要形式它有右侧和底部的面板(表格上的永久性 - 黄色区域)
,在剩下的一侧我称为form1填充剩余区域。
但是当我从子form1调用子Form2时,它适合该区域。
由于屏幕分辨率问题,我无法在运行时设置表单大小。
I want to call child form from child .
but whenever i call it doesnt fit in the area.
I have used MDIParent as main form It has Panel on the right side and bottom (Permanent on the form -Area in Yellow Color)
and on the remaining side I call form1 which fills the remaining area.
but when i call child Form2 from child form1 it dosent fit in the area.
I cannot set form size at runtime because of screen resolution problem.
the following code call form1
private void MDIParent1_Load(object sender, EventArgs e)
{
Form1 chForm = new Form1();
//set parent form for the child window
chForm.MdiParent = this;
//increment the child form count
count++;
//set the title of the child window.
chForm.Text = "Child - " + count.ToString();
chForm.Dock = DockStyle.Fill;
chForm.WindowState =System.Windows.Forms.FormWindowState.Maximized;
//display the child window
chForm.Show();
}
从儿童Form1调用儿童Form2的方法
<img src="https://farm3.staticflickr.com/2917/14136391062_de1a4a2a27_s.jpg" width="100" height="75" alt="problem">
Method for calling child Form2 from child Form1
public void ShowNewForm(object sender, EventArgs e)
{
Form2 childForm = new Form2 ();
childForm.MdiParent = this.ParentForm;
childForm.Dock = DockStyle.Fill;
childForm.StartPosition = FormStartPosition;
childForm.WindowState =System.Windows.Forms.FormWindowState.Maximized;
childForm.BringToFront();
childForm.Show();
}
1.从另一个儿童表格打电话到儿童表格如何适合
剩余位置(AreatofitChildForm- MDIParentForm-Panel1Size-Panel2Size)
2.另一个问题是,为什么我在MDIform上看到表格标题和边框。 />
Idont想要那个
3.当我尝试移动form1时,它显示滚动条为什么?
先谢谢你。
1.How to fit a child form when called from another child form to exactly at
remaining position(AreatofitChildForm- MDIParentForm-Panel1Size-Panel2Size)
2.Another question is,why do i see a form Title and border on MDIform.
Idont want that
3.When i try to move form1 it shows scrollbar why?
Thankyou in Advance.
推荐答案
这篇关于MDI表单问题子表单调用另一种形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!