C# MDI窗口中填满部分界面的问题

lmx520_2007 lmx520_2007 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

如图 我要让“回路绘制区”在点击出现后填满父窗口除了“yjk”右侧的部分 而且要保证其随界面变化而相应的变大小 该怎么实现呀
目前相应代码如下:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace 界面1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
Form2 yjk = new Form2();
Form3 huilu = new Form3();
private void Form1_Load(object sender, EventArgs e)
{
yjk.MdiParent = this;
yjk.StartPosition = FormStartPosition.Manual;
double x = this.Width;
double y = this.Height;
yjk.Width = (int)x / 4;
yjk.Height = (int)y;
yjk.Show();
yjk.ControlBox = false;
//yjk.FormBorderStyle = FormBorderStyle.None;
huilu.StartPosition = FormStartPosition.CenterScreen;
huilu.Dock = DockStyle.Fill;

}

private void Form1_SizeChanged(object sender, EventArgs e)
{
double x = this.Width;
double y = this.Height;
yjk.Width = (int)x / 4;
yjk.Height = (int)y;
yjk.Show();
}

private void toolStripButton5_Click(object sender, EventArgs e)
{

huilu.MdiParent=this;
huilu.Text = "回路绘制区";
huilu.Show();
}
}
}
求高手给予解答 多些了
...全文

相关推荐

评论 5
收藏 已收藏
分享
返回顶部
lmx520_2007
C# 111,129 成员 642,538 内容