主窗体的panel 中放着子窗体 如何让主窗体拖动大小 子窗体也大小也改变
this.bcpEditArea.Controls.Clear();
fdrug.ucNumTxtAmount.Text = "";
fdrug.ucNumTxtUAmount.Text = "";
//判断窗体是否变大
if (SizeHeight > 762)
{
fdrug.TopLevel = true;
this.pnlTab3.Visible = false;
fdrug.Width = 500 + PlusWidth;
fdrug.Height = 591 + PlusHeight;
fdrug.flgDrugAdptDiv.Width = 473 + PlusWidth;
fdrug.flgDrugAdptDiv.Height = 411 + PlusHeight;
}
//医師の場合
if (GlobalInfo.SystemModeInfo.SystemMode == 1)
{
Set_PnlPositionAndVisible(false);
fdrug.TopLevel = false;
fdrug.FormBorderStyle = FormBorderStyle.None;
this.bcpEditArea.Controls.Add(fdrug);
fdrug.Show();
}
//看護師の場合
else if (GlobalInfo.SystemModeInfo.SystemMode == 2)
{
Set_PnlPositionAndVisible(true);
this.flgInstructionsDo.Width = 442;
}
this.bcpEditArea.Controls.Clear();
fdrug.ucNumTxtAmount.Text = "";
fdrug.ucNumTxtUAmount.Text = "";
//判断窗体是否变大
if (SizeHeight > 762)
{
fdrug.TopLevel = true;
this.pnlTab3.Visible = false;
fdrug.Width = 500 + PlusWidth;
fdrug.Height = 591 + PlusHeight;
fdrug.flgDrugAdptDiv.Width = 473 + PlusWidth;
fdrug.flgDrugAdptDiv.Height = 411 + PlusHeight;
}
//医師の場合
if (GlobalInfo.SystemModeInfo.SystemMode == 1)
{
Set_PnlPositionAndVisible(false);
fdrug.TopLevel = false;
fdrug.FormBorderStyle = FormBorderStyle.None;
this.bcpEditArea.Controls.Add(fdrug);
fdrug.Show();
}
//看護師の場合
else if (GlobalInfo.SystemModeInfo.SystemMode == 2)
{
Set_PnlPositionAndVisible(true);
this.flgInstructionsDo.Width = 442;
}
解决方案 »
- 跪求登陆Session获取值的问题
- c#程序如何能在运行时无显示只在任务管理器中有个进程?
- IIS 打开虚拟目录属性时抱错:COM Surrogate 遇到问题需要关闭。我们对此引起的不便表示抱歉
- 数据库查询问题,急???????????????????????????????????????
- 如何制作网页左边的导航菜单吗?
- C# web项目中执行的时候global.asax文件不执行,请教怎么处理?
- sqlserver2005 大批量插入数据
- 在C#中,怎么取到一个字符的ASC码?谢谢,着急!!!
- C#有开方函数吗?
- Image.FromFile的加载的图片,为什么显示很小的图片。谢谢先。
- C#发送数据到SATO CL612e条码打印机上
- 有什么方法可以获得大素数么?
这个 一个大层中有两个小层
我用代码设置的宽度和高度随着主窗体的大小而改变
但是大层中的 第二个层遮住了第一个层
fdrug.TopLevel = true;
this.pnlTab3.Visible = false;
fdrug.Width = 500 + PlusWidth;
fdrug.Height = 591 + PlusHeight;
fdrug.flgDrugAdptDiv.Width = 473 + PlusWidth;
fdrug.flgDrugAdptDiv.Height = 411 + PlusHeight;