如何让三个PANEL排在同一个tabcontrol里按比例缩放 试了几个网上的,WINFORM按比例缩放的,都不行,一放大,就全乱了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 重载 OnSize 方法,在里面根据比例调整大小 使用 TableLayoutPanel 控件,设置Columns,宽度都以百分比设置就可以了。 一楼上源码啊,我试几个都不行private void Form1_ResizeEnd(object sender, EventArgs e) { this.panel1.Size = new Size(this.panel1.Parent.Size.Width / 2, this.panel1.Parent.Size.Height); this.panel2.Location = new Point(this.panel1.Location.X + this.panel1.Size.Width, this.panel1.Location.Y); this.panel2.Size = new Size(this.panel1.Parent.Size.Width / 2, this.panel1.Parent.Size.Height/2); this.panel2.Location = new Point(this.panel1.Location.X + this.panel1.Size.Width, this.panel2.Location.Y+this.panel1.Parent.Height+this.panel2.Size.Height); this.panel3.Size = new Size(this.panel1.Parent.Size.Width / 2, this.panel1.Parent.Size.Height/2); }这样可以,但是最大化最小化的时候无反应 Form1_Resize事件改为这个就可以了!解决! 新手问题,求老鸟 C#的接口技术。。 向高手求救关于if语句!!! 测试问题 如何使在程序集A中调用 new xxclass 时生成的对象更改为程序集B中某个对象? 资源问题 散7个Gmail,要的留下信箱。 C# WINFORM程序运行报错,有的计算机上运行不会出错 怎么多了个点啊··· 是什么意思 奇怪的现象,调试的时候下载的文件没乱码,不调试下载的文件是乱码 C#什么时候发售? 遇到一个函数要转换 www.godaddy.com上配制access数据库发生Exception Details: System.Data.OleDb.OleDbException
private void Form1_ResizeEnd(object sender, EventArgs e)
{
this.panel1.Size = new Size(this.panel1.Parent.Size.Width / 2, this.panel1.Parent.Size.Height);
this.panel2.Location = new Point(this.panel1.Location.X + this.panel1.Size.Width, this.panel1.Location.Y);
this.panel2.Size = new Size(this.panel1.Parent.Size.Width / 2, this.panel1.Parent.Size.Height/2);
this.panel2.Location = new Point(this.panel1.Location.X + this.panel1.Size.Width, this.panel2.Location.Y+this.panel1.Parent.Height+this.panel2.Size.Height);
this.panel3.Size = new Size(this.panel1.Parent.Size.Width / 2, this.panel1.Parent.Size.Height/2);
}
这样可以,但是最大化最小化的时候无反应