1. 程式人生 > >winform 自適應螢幕解析度

winform 自適應螢幕解析度

using System;
namespace Test
{
    partial class Form1
    {
        private System.Windows.Forms.Panel panel1;
        private System.Windows.Forms.Panel panel2;
        private System.Windows.Forms.Panel panel3;
        private System.Windows.Forms.Panel panel4;
        private System.Windows.Forms.Panel panel5;
        private System.Windows.Forms.DataGrid dataGrid1;
        private System.Windows.Forms.ListBox listBox1;
        private System.Windows.Forms.Panel panel6;
        private System.Windows.Forms.Panel panel7;
        private System.Windows.Forms.TextBox textBox1;
        private System.Windows.Forms.TextBox textBox2;
        private System.Windows.Forms.TextBox textBox3;
        private System.Windows.Forms.TextBox textBox4;
        private System.Windows.Forms.TextBox textBox5;
        private System.Windows.Forms.TextBox textBox6;


        /// <summary>
        /// 必需的設計器變數。
        /// </summary>
        private System.ComponentModel.IContainer components = null;


        /// <summary>
        /// 清理所有正在使用的資源。
        /// </summary>
        /// <param name="disposing">如果應釋放託管資源,為 true;否則為 false。</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }


        #region Windows 窗體設計器生成的程式碼


        /// <summary>
        /// 設計器支援所需的方法 - 不要
        /// 使用程式碼編輯器修改此方法的內容。
        /// </summary>
        private void InitializeComponent()
        {
            this.panel1 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.panel4 = new System.Windows.Forms.Panel();
this.panel5 = new System.Windows.Forms.Panel();
this.dataGrid1 = new System.Windows.Forms.DataGrid();
this.listBox1 = new System.Windows.Forms.ListBox();
this.panel6 = new System.Windows.Forms.Panel();
this.panel7 = new System.Windows.Forms.Panel();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.textBox4 = new System.Windows.Forms.TextBox();
this.textBox5 = new System.Windows.Forms.TextBox();
this.textBox6 = new System.Windows.Forms.TextBox();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel3.SuspendLayout();
this.panel4.SuspendLayout();
this.panel5.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
this.panel6.SuspendLayout();
this.panel7.SuspendLayout();
this.SuspendLayout();
// 
// panel1
// 
this.panel1.Controls.Add(this.panel7);
this.panel1.Controls.Add(this.panel6);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(496, 48);
this.panel1.TabIndex = 0;
// 
// panel2
// 
this.panel2.Controls.Add(this.textBox5);
this.panel2.Controls.Add(this.textBox6);
this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel2.Location = new System.Drawing.Point(0, 237);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(496, 48);
this.panel2.TabIndex = 1;
// 
// panel3
// 
this.panel3.Controls.Add(this.panel5);
this.panel3.Controls.Add(this.panel4);
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel3.Location = new System.Drawing.Point(0, 48);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(496, 189);
this.panel3.TabIndex = 2;
// 
// panel4
// 
this.panel4.Controls.Add(this.listBox1);
this.panel4.Dock = System.Windows.Forms.DockStyle.Left;
this.panel4.Location = new System.Drawing.Point(0, 0);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(200, 189);
this.panel4.TabIndex = 0;
// 
// panel5
// 
this.panel5.Controls.Add(this.dataGrid1);
this.panel5.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel5.Location = new System.Drawing.Point(200, 0);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(296, 189);
this.panel5.TabIndex = 1;
// 
// dataGrid1
//


// 
// dataGrid1
// 
this.dataGrid1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
| System.Windows.Forms.AnchorStyles.Left) 
| System.Windows.Forms.AnchorStyles.Right)));
this.dataGrid1.DataMember = "";
this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid1.Location = new System.Drawing.Point(0, 0);
this.dataGrid1.Name = "dataGrid1";
this.dataGrid1.Size = new System.Drawing.Size(296, 189);
this.dataGrid1.TabIndex = 0;
// 
// listBox1
// 
this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
| System.Windows.Forms.AnchorStyles.Left) 
| System.Windows.Forms.AnchorStyles.Right)));
this.listBox1.ItemHeight = 12;
this.listBox1.Location = new System.Drawing.Point(0, 0);
this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(200, 184);
this.listBox1.TabIndex = 0;
// 
// panel6
// 
this.panel6.Controls.Add(this.textBox2);
this.panel6.Controls.Add(this.textBox1);
this.panel6.Dock = System.Windows.Forms.DockStyle.Left;
this.panel6.Location = new System.Drawing.Point(0, 0);
this.panel6.Name = "panel6";
this.panel6.Size = new System.Drawing.Size(240, 48);
this.panel6.TabIndex = 0;
// 
// panel7
// 
this.panel7.Controls.Add(this.textBox3);
this.panel7.Controls.Add(this.textBox4);
this.panel7.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel7.Location = new System.Drawing.Point(240, 0);
this.panel7.Name = "panel7";
this.panel7.Size = new System.Drawing.Size(256, 48);
this.panel7.TabIndex = 1;
// 
// textBox1
// 
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox1.Location = new System.Drawing.Point(4, 4);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(236, 21);
this.textBox1.TabIndex = 0;
this.textBox1.Text = "textBox1";
// 
// textBox2
// 
this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox2.Location = new System.Drawing.Point(4, 25);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(236, 21);
this.textBox2.TabIndex = 1;
this.textBox2.Text = "textBox2";
// 
// textBox3
// 
this.textBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox3.Location = new System.Drawing.Point(4, 24);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(252, 21);
this.textBox3.TabIndex = 3;
this.textBox3.Text = "textBox3";
// 
// textBox4
// 
this.textBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox4.Location = new System.Drawing.Point(4, 3);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(252, 21);
this.textBox4.TabIndex = 2;
this.textBox4.Text = "textBox4";
// 
// textBox5
// 
this.textBox5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox5.Location = new System.Drawing.Point(4, 24);
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(492, 21);
this.textBox5.TabIndex = 3;
this.textBox5.Text = "textBox5";
// 
// textBox6
// 
this.textBox6.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox6.Location = new System.Drawing.Point(4, 3);
this.textBox6.Name = "textBox6";
this.textBox6.Size = new System.Drawing.Size(492, 21);
this.textBox6.TabIndex = 2;
this.textBox6.Text = "textBox6";
// 
// Form1
// 
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(496, 285);
this.Controls.Add(this.panel3);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.Name = "Form1";
this.Text = "Form1";
this.panel1.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.panel4.ResumeLayout(false);
this.panel5.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
this.panel6.ResumeLayout(false);
this.panel7.ResumeLayout(false);
this.ResumeLayout(false);
this.Resize +=new EventHandler(Form1_Resize);


        }


        #endregion
    }
}