Çözüldü C# Buton Kontrollü Panel

Bu konu çözüldü olarak işaretlenmiştir. Çözülmediğini düşünüyorsanız konuyu rapor edebilirsiniz.

metinsama

Kilopat
Katılım
7 Aralık 2014
Mesajlar
810
Çözümler
5
Arkadaşlar okulda bir projem var. Arduino'dan aldığım verileri Form üzerinde göstermek istiyorum buraya kadar her şey çalışıyor fakat arayüzü tam yapamadım. Butona bastığımda 1. panel 2. butona bastığımda kullanıcıya 2. panel gözüksün istiyorum. Panelx. Visible diye kod yazdım fakat bazen çalışıyor bazen çalışmıyor (2. butona bastığımda 2. panel gözükmüyor art arda basınca da 1. panel gözüküyor.) Bunu daha stabil bir şekilde nasıl yapabilirim? İnternette bazıları user form kullanıyor fakat onu kullanırsam her bir userform için tekrar serial port tanımlamaları yapacağımdan bana pek mantıklı gelmedi. Elektronik öğrencisi olduğum için C# hakkında fazla bilgim yok şimdiden herkese teşekkür ederim.
 
Son düzenleyen: Moderatör:
Çözüm
Hatalı Kod Bloğu.png


Evet, panellm adlı panel panelpot adlı panel içerisine girmiş ilk satırda görüleceği üzere.

C#:
namespace arduinowithimage
{
    partial class Form1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
            this.panelX = new System.Windows.Forms.Panel();
            this.buttonbattery = new System.Windows.Forms.Button();
            this.buttonbtn = new System.Windows.Forms.Button();
            this.buttonled = new System.Windows.Forms.Button();
            this.buttonhcsr = new System.Windows.Forms.Button();
            this.buttonir = new System.Windows.Forms.Button();
            this.buttonldr = new System.Windows.Forms.Button();
            this.buttonlm35 = new System.Windows.Forms.Button();
            this.buttonlcd = new System.Windows.Forms.Button();
            this.buttonPot = new System.Windows.Forms.Button();
            this.panelY = new System.Windows.Forms.Panel();
            this.label2 = new System.Windows.Forms.Label();
            this.label1 = new System.Windows.Forms.Label();
            this.comboBox1 = new System.Windows.Forms.ComboBox();
            this.serialPort1 = new System.IO.Ports.SerialPort(this.components);
            this.timer1 = new System.Windows.Forms.Timer(this.components);
            this.panelpot = new System.Windows.Forms.Panel();
            this.pictureBox1 = new System.Windows.Forms.PictureBox();
            this.textBox1 = new System.Windows.Forms.TextBox();
            this.label5 = new System.Windows.Forms.Label();
            this.label4 = new System.Windows.Forms.Label();
            this.label3 = new System.Windows.Forms.Label();
            this.progressBar1 = new System.Windows.Forms.ProgressBar();
            this.panellm = new System.Windows.Forms.Panel();
            this.button1 = new System.Windows.Forms.Button();
            this.button2 = new System.Windows.Forms.Button();
            this.label6 = new System.Windows.Forms.Label();
            this.panelX.SuspendLayout();
            this.panelY.SuspendLayout();
            this.panelpot.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
            this.panellm.SuspendLayout();
            this.SuspendLayout();
            //
            // panelX
            //
            this.panelX.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(39)))), ((int)(((byte)(53)))));
            this.panelX.Controls.Add(this.buttonbattery);
            this.panelX.Controls.Add(this.buttonbtn);
            this.panelX.Controls.Add(this.buttonled);
            this.panelX.Controls.Add(this.buttonhcsr);
            this.panelX.Controls.Add(this.buttonir);
            this.panelX.Controls.Add(this.buttonldr);
            this.panelX.Controls.Add(this.buttonlm35);
            this.panelX.Controls.Add(this.buttonlcd);
            this.panelX.Controls.Add(this.buttonPot);
            this.panelX.Dock = System.Windows.Forms.DockStyle.Left;
            this.panelX.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(126)))), ((int)(((byte)(249)))));
            this.panelX.Location = new System.Drawing.Point(0, 0);
            this.panelX.Margin = new System.Windows.Forms.Padding(4);
            this.panelX.Name = "panelX";
            this.panelX.Size = new System.Drawing.Size(195, 618);
            this.panelX.TabIndex = 1;
            //
            // buttonbattery
            //
            this.buttonbattery.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonbattery.FlatAppearance.BorderSize = 0;
            this.buttonbattery.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonbattery.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonbattery.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonbattery.Location = new System.Drawing.Point(0, 466);
            this.buttonbattery.Name = "buttonbattery";
            this.buttonbattery.Size = new System.Drawing.Size(195, 42);
            this.buttonbattery.TabIndex = 11;
            this.buttonbattery.Text = "Pil";
            this.buttonbattery.UseVisualStyleBackColor = true;
            //
            // buttonbtn
            //
            this.buttonbtn.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonbtn.FlatAppearance.BorderSize = 0;
            this.buttonbtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonbtn.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonbtn.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonbtn.Location = new System.Drawing.Point(0, 424);
            this.buttonbtn.Name = "buttonbtn";
            this.buttonbtn.Size = new System.Drawing.Size(195, 42);
            this.buttonbtn.TabIndex = 10;
            this.buttonbtn.Text = "Buton";
            this.buttonbtn.UseVisualStyleBackColor = true;
            //
            // buttonled
            //
            this.buttonled.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonled.FlatAppearance.BorderSize = 0;
            this.buttonled.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonled.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonled.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonled.Location = new System.Drawing.Point(0, 382);
            this.buttonled.Name = "buttonled";
            this.buttonled.Size = new System.Drawing.Size(195, 42);
            this.buttonled.TabIndex = 9;
            this.buttonled.Text = "RGB LED";
            this.buttonled.UseVisualStyleBackColor = true;
            //
            // buttonhcsr
            //
            this.buttonhcsr.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonhcsr.FlatAppearance.BorderSize = 0;
            this.buttonhcsr.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonhcsr.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonhcsr.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonhcsr.Location = new System.Drawing.Point(0, 340);
            this.buttonhcsr.Name = "buttonhcsr";
            this.buttonhcsr.Size = new System.Drawing.Size(195, 42);
            this.buttonhcsr.TabIndex = 8;
            this.buttonhcsr.Text = "HCSR-04";
            this.buttonhcsr.UseVisualStyleBackColor = true;
            //
            // buttonir
            //
            this.buttonir.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonir.FlatAppearance.BorderSize = 0;
            this.buttonir.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonir.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonir.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonir.Location = new System.Drawing.Point(0, 298);
            this.buttonir.Name = "buttonir";
            this.buttonir.Size = new System.Drawing.Size(195, 42);
            this.buttonir.TabIndex = 7;
            this.buttonir.Text = "IR Sensör\r\n";
            this.buttonir.UseVisualStyleBackColor = true;
            //
            // buttonldr
            //
            this.buttonldr.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonldr.FlatAppearance.BorderSize = 0;
            this.buttonldr.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonldr.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonldr.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonldr.Location = new System.Drawing.Point(0, 256);
            this.buttonldr.Name = "buttonldr";
            this.buttonldr.Size = new System.Drawing.Size(195, 42);
            this.buttonldr.TabIndex = 6;
            this.buttonldr.Text = "LDR";
            this.buttonldr.UseVisualStyleBackColor = true;
            //
            // buttonlm35
            //
            this.buttonlm35.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonlm35.FlatAppearance.BorderSize = 0;
            this.buttonlm35.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonlm35.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonlm35.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonlm35.Location = new System.Drawing.Point(0, 214);
            this.buttonlm35.Name = "buttonlm35";
            this.buttonlm35.Size = new System.Drawing.Size(195, 42);
            this.buttonlm35.TabIndex = 5;
            this.buttonlm35.Text = "LM35";
            this.buttonlm35.UseVisualStyleBackColor = true;
            this.buttonlm35.Click += new System.EventHandler(this.buttonlm35_Click);
            //
            // buttonlcd
            //
            this.buttonlcd.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonlcd.FlatAppearance.BorderSize = 0;
            this.buttonlcd.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonlcd.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonlcd.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonlcd.Location = new System.Drawing.Point(0, 172);
            this.buttonlcd.Name = "buttonlcd";
            this.buttonlcd.Size = new System.Drawing.Size(195, 42);
            this.buttonlcd.TabIndex = 4;
            this.buttonlcd.Text = "LCD";
            this.buttonlcd.UseVisualStyleBackColor = true;
            this.buttonlcd.Click += new System.EventHandler(this.buttonlcd_Click);
            //
            // buttonPot
            //
            this.buttonPot.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonPot.FlatAppearance.BorderSize = 0;
            this.buttonPot.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonPot.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonPot.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonPot.Location = new System.Drawing.Point(0, 130);
            this.buttonPot.Name = "buttonPot";
            this.buttonPot.Size = new System.Drawing.Size(195, 42);
            this.buttonPot.TabIndex = 3;
            this.buttonPot.Text = "Potansiyometre";
            this.buttonPot.UseVisualStyleBackColor = true;
            this.buttonPot.Click += new System.EventHandler(this.buttonPot_Click);
            //
            // panelY
            //
            this.panelY.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(39)))), ((int)(((byte)(53)))));
            this.panelY.Controls.Add(this.label2);
            this.panelY.Controls.Add(this.label1);
            this.panelY.Controls.Add(this.comboBox1);
            this.panelY.Dock = System.Windows.Forms.DockStyle.Top;
            this.panelY.Location = new System.Drawing.Point(0, 0);
            this.panelY.Margin = new System.Windows.Forms.Padding(4);
            this.panelY.Name = "panelY";
            this.panelY.Size = new System.Drawing.Size(195, 130);
            this.panelY.TabIndex = 2;
            //
            // label2
            //
            this.label2.AutoSize = true;
            this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
            this.label2.Location = new System.Drawing.Point(26, 95);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(0, 20);
            this.label2.TabIndex = 3;
            //
            // label1
            //
            this.label1.AutoSize = true;
            this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(156)))), ((int)(((byte)(149)))));
            this.label1.Location = new System.Drawing.Point(25, 9);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(58, 25);
            this.label1.TabIndex = 2;
            this.label1.Text = "PORT";
            //
            // comboBox1
            //
            this.comboBox1.FormattingEnabled = true;
            this.comboBox1.Location = new System.Drawing.Point(30, 48);
            this.comboBox1.Margin = new System.Windows.Forms.Padding(4);
            this.comboBox1.Name = "comboBox1";
            this.comboBox1.Size = new System.Drawing.Size(147, 33);
            this.comboBox1.TabIndex = 0;
            this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
            //
            // serialPort1
            //
            this.serialPort1.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(this.serialPort1_DataReceived);
            //
            // panelpot
            //
            this.panelpot.Controls.Add(this.pictureBox1);
            this.panelpot.Controls.Add(this.textBox1);
            this.panelpot.Controls.Add(this.label5);
            this.panelpot.Controls.Add(this.label4);
            this.panelpot.Controls.Add(this.label3);
            this.panelpot.Controls.Add(this.progressBar1);
            this.panelpot.Location = new System.Drawing.Point(202, 12);
            this.panelpot.Name = "panelpot";
            this.panelpot.Size = new System.Drawing.Size(599, 618);
            this.panelpot.TabIndex = 2;
            this.panelpot.Visible = false;
            //
            // pictureBox1
            //
            this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
            this.pictureBox1.Location = new System.Drawing.Point(405, 449);
            this.pictureBox1.Name = "pictureBox1";
            this.pictureBox1.Size = new System.Drawing.Size(110, 90);
            this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
            this.pictureBox1.TabIndex = 5;
            this.pictureBox1.TabStop = false;
            //
            // textBox1
            //
            this.textBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(22)))), ((int)(((byte)(46)))), ((int)(((byte)(59)))));
            this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.textBox1.Location = new System.Drawing.Point(21, 161);
            this.textBox1.Multiline = true;
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(429, 246);
            this.textBox1.TabIndex = 4;
            this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
            //
            // label5
            //
            this.label5.AutoSize = true;
            this.label5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(10)))), ((int)(((byte)(38)))));
            this.label5.Location = new System.Drawing.Point(95, 122);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(22, 25);
            this.label5.TabIndex = 3;
            this.label5.Text = "0";
            //
            // label4
            //
            this.label4.AutoSize = true;
            this.label4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(10)))), ((int)(((byte)(38)))));
            this.label4.Location = new System.Drawing.Point(21, 122);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(77, 25);
            this.label4.TabIndex = 2;
            this.label4.Text = "Değeri :";
            //
            // label3
            //
            this.label3.AutoSize = true;
            this.label3.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(10)))), ((int)(((byte)(38)))));
            this.label3.Location = new System.Drawing.Point(16, 26);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(151, 25);
            this.label3.TabIndex = 1;
            this.label3.Text = "Potansiyometre";
            //
            // progressBar1
            //
            this.progressBar1.ForeColor = System.Drawing.Color.HotPink;
            this.progressBar1.Location = new System.Drawing.Point(21, 69);
            this.progressBar1.Maximum = 1023;
            this.progressBar1.Name = "progressBar1";
            this.progressBar1.Size = new System.Drawing.Size(429, 46);
            this.progressBar1.TabIndex = 0;
            //
            // panellm
            //
            this.panellm.Controls.Add(this.button2);
            this.panellm.Controls.Add(this.button1);
            this.panellm.Location = new System.Drawing.Point(1, 0);
            this.panellm.Name = "panellm";
            this.panellm.Size = new System.Drawing.Size(595, 595);
            this.panellm.TabIndex = 6;
            this.panellm.Visible = false;
            //
            // button1
            //
            this.button1.Location = new System.Drawing.Point(187, 130);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(75, 23);
            this.button1.TabIndex = 0;
            this.button1.Text = "button1";
            this.button1.UseVisualStyleBackColor = true;
            //
            // button2
            //
            this.button2.Location = new System.Drawing.Point(149, 248);
            this.button2.Name = "button2";
            this.button2.Size = new System.Drawing.Size(75, 23);
            this.button2.TabIndex = 1;
            this.button2.Text = "button2";
            this.button2.UseVisualStyleBackColor = true;
            //
            // label6
            //
            this.label6.AutoSize = true;
            this.label6.Location = new System.Drawing.Point(312, 48);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(63, 25);
            this.label6.TabIndex = 3;
            this.label6.Text = "label6";
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 25F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(22)))), ((int)(((byte)(46)))), ((int)(((byte)(59)))));
            this.CausesValidation = false;
            this.ClientSize = new System.Drawing.Size(813, 618);
            this.Controls.Add(this.label6);
            this.Controls.Add(this.panelpot);
            this.Controls.Add(this.panelX);
            this.Controls.Add(this.panelY);
            this.Controls.Add(this.panellm);
            this.Cursor = System.Windows.Forms.Cursors.Default;
            this.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
            this.KeyPreview = true;
            this.Margin = new System.Windows.Forms.Padding(5);
            this.Name = "Form1";
            this.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.ShowIcon = false;
            this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
            this.Text = "Form1";
            this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Form1_FormClosed);
            this.Load += new System.EventHandler(this.Form1_Load);
            this.panelX.ResumeLayout(false);
            this.panelY.ResumeLayout(false);
            this.panelY.PerformLayout();
            this.panelpot.ResumeLayout(false);
            this.panelpot.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
            this.panellm.ResumeLayout(false);
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.Panel panelX;
        private System.Windows.Forms.Panel panelY;
        private System.Windows.Forms.ComboBox comboBox1;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.Button buttonPot;
        private System.Windows.Forms.Button buttonbattery;
        private System.Windows.Forms.Button buttonbtn;
        private System.Windows.Forms.Button buttonled;
        private System.Windows.Forms.Button buttonhcsr;
        private System.Windows.Forms.Button buttonir;
        private System.Windows.Forms.Button buttonldr;
        private System.Windows.Forms.Button buttonlm35;
        private System.Windows.Forms.Button buttonlcd;
        private System.IO.Ports.SerialPort serialPort1;
        private System.Windows.Forms.Timer timer1;
        private System.Windows.Forms.Panel panelpot;
        private System.Windows.Forms.ProgressBar progressBar1;
        private System.Windows.Forms.TextBox textBox1;
        private System.Windows.Forms.Label label5;
        private System.Windows.Forms.Label label4;
        private System.Windows.Forms.Label label3;
        private System.Windows.Forms.PictureBox pictureBox1;
        private System.Windows.Forms.Panel panellm;
        private System.Windows.Forms.Button button2;
        private System.Windows.Forms.Button button1;
        private System.Windows.Forms.Label label6;
    }
}

Kodu bununla değiştirir misiniz?
Arkadaşlar okulda bir projem var. Arduino'dan aldığım verileri form üzerinde göstermek istiyorum buraya kadar her şey çalışıyor fakat arayüzü tam yapamadım. Butona bastığımda 1. panel 2. butona bastığımda kullanıcıya 2. panel gözüksün istiyorum. Panelx. Visible diye kod yazdım fakat bazen çalışıyor bazen çalışmıyor (2. butona bastığımda 2. panel gözükmüyor art arda basınca da 1. panel gözüküyor.) Bunu daha stabil bir şekilde nasıl yapabilirim? İnternette bazıları user form kullanıyor fakat onu kullanırsam her bir userform için tekrar serial port tanımlamaları yapacağımdan bana pek mantıklı gelmedi. Elektronik öğrencisi olduğum için C# hakkında fazla bilgim yok şimdiden herkese teşekkür ederim.

Burada çözüm bulursan çok şanşlısn burada bu tür konulara çok fazla çözüm bulan çıkmıyor :(
 
İki panel de aynı boyutta ve aynı yerde ise birinin kontrolü diğerinin içine girmiş olabilir. Bu durumda tasarım kodlarının içerisinden düzenleme yapmak gereklidir. Benzer bir durumu ben de yaşamıştım.
 
Evet, aynısını ben de yaşamıştım. Form1.Designer.cs dosyanızın içeriğini atar mısınız?
C#:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO.Ports;

namespace arduinowithimage
{
    public partial class Form1 : Form
    {
        public string data;
        public string[] datx;
        public Form1()
        {
            InitializeComponent();
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            string[] ports;
            ports = SerialPort.GetPortNames();
            foreach (string port in ports)
            {
                comboBox1.Items.Add(port);
            }
            serialPort1.DataReceived += new SerialDataReceivedEventHandler(serialPort1_DataReceived);
            
        }
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            serialPort1.PortName = comboBox1.SelectedItem.ToString();
            serialPort1.Open();
            if (serialPort1.IsOpen)
            {
                serialPort1.BaudRate = 9600;
                label2.Text = "PORT AKTİF";

            }
        }

        private void buttonPot_Click(object sender, EventArgs e)
        {
            panelpot.Visible = true;
            panellm.Visible = false;
            textBox1.ReadOnly = true;
            

        }

        private void serialPort1_DataReceived(object sender, SerialDataReceivedEventArgs e)
        {
            data = serialPort1.ReadLine();                   
            datx = data.Split(',');
            this.Invoke(new EventHandler(displayData_event));
        }
        private void displayData_event(object sender, EventArgs e)
        {
            progressBar1.Value = Convert.ToInt16(datx[0]);                         
            textBox1.Text += DateTime.Now.ToString() + "        " + data + "\n";
            label5.Text = datx[0];
                                          
        }
        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            textBox1.Select(textBox1.TextLength, 0);
            textBox1.ScrollToCaret();
        }



        private void Form1_FormClosed(object sender, FormClosedEventArgs e)
        {
            if (serialPort1.IsOpen)
            {
                serialPort1.Close();
            }
        }

        private void buttonlm35_Click(object sender, EventArgs e)
        {
            panelpot.Visible = false;
            panellm.Visible = true;
            
        }

    }
}
 
Designer, yani tasarım kodlarını istemiştim. Bu kod tasarım kodu değil.

Eki Görüntüle 1032110
C#:
namespace arduinowithimage
{
    partial class Form1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
            this.panelX = new System.Windows.Forms.Panel();
            this.buttonbattery = new System.Windows.Forms.Button();
            this.buttonbtn = new System.Windows.Forms.Button();
            this.buttonled = new System.Windows.Forms.Button();
            this.buttonhcsr = new System.Windows.Forms.Button();
            this.buttonir = new System.Windows.Forms.Button();
            this.buttonldr = new System.Windows.Forms.Button();
            this.buttonlm35 = new System.Windows.Forms.Button();
            this.buttonlcd = new System.Windows.Forms.Button();
            this.buttonPot = new System.Windows.Forms.Button();
            this.panelY = new System.Windows.Forms.Panel();
            this.label2 = new System.Windows.Forms.Label();
            this.label1 = new System.Windows.Forms.Label();
            this.comboBox1 = new System.Windows.Forms.ComboBox();
            this.serialPort1 = new System.IO.Ports.SerialPort(this.components);
            this.timer1 = new System.Windows.Forms.Timer(this.components);
            this.panelpot = new System.Windows.Forms.Panel();
            this.pictureBox1 = new System.Windows.Forms.PictureBox();
            this.textBox1 = new System.Windows.Forms.TextBox();
            this.label5 = new System.Windows.Forms.Label();
            this.label4 = new System.Windows.Forms.Label();
            this.label3 = new System.Windows.Forms.Label();
            this.progressBar1 = new System.Windows.Forms.ProgressBar();
            this.panellm = new System.Windows.Forms.Panel();
            this.button1 = new System.Windows.Forms.Button();
            this.button2 = new System.Windows.Forms.Button();
            this.label6 = new System.Windows.Forms.Label();
            this.panelX.SuspendLayout();
            this.panelY.SuspendLayout();
            this.panelpot.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
            this.panellm.SuspendLayout();
            this.SuspendLayout();
            //
            // panelX
            //
            this.panelX.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(39)))), ((int)(((byte)(53)))));
            this.panelX.Controls.Add(this.buttonbattery);
            this.panelX.Controls.Add(this.buttonbtn);
            this.panelX.Controls.Add(this.buttonled);
            this.panelX.Controls.Add(this.buttonhcsr);
            this.panelX.Controls.Add(this.buttonir);
            this.panelX.Controls.Add(this.buttonldr);
            this.panelX.Controls.Add(this.buttonlm35);
            this.panelX.Controls.Add(this.buttonlcd);
            this.panelX.Controls.Add(this.buttonPot);
            this.panelX.Controls.Add(this.panelY);
            this.panelX.Dock = System.Windows.Forms.DockStyle.Left;
            this.panelX.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(126)))), ((int)(((byte)(249)))));
            this.panelX.Location = new System.Drawing.Point(0, 0);
            this.panelX.Margin = new System.Windows.Forms.Padding(4);
            this.panelX.Name = "panelX";
            this.panelX.Size = new System.Drawing.Size(195, 618);
            this.panelX.TabIndex = 1;
            //
            // buttonbattery
            //
            this.buttonbattery.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonbattery.FlatAppearance.BorderSize = 0;
            this.buttonbattery.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonbattery.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonbattery.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonbattery.Location = new System.Drawing.Point(0, 466);
            this.buttonbattery.Name = "buttonbattery";
            this.buttonbattery.Size = new System.Drawing.Size(195, 42);
            this.buttonbattery.TabIndex = 11;
            this.buttonbattery.Text = "Pil";
            this.buttonbattery.UseVisualStyleBackColor = true;
            //
            // buttonbtn
            //
            this.buttonbtn.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonbtn.FlatAppearance.BorderSize = 0;
            this.buttonbtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonbtn.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonbtn.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonbtn.Location = new System.Drawing.Point(0, 424);
            this.buttonbtn.Name = "buttonbtn";
            this.buttonbtn.Size = new System.Drawing.Size(195, 42);
            this.buttonbtn.TabIndex = 10;
            this.buttonbtn.Text = "Buton";
            this.buttonbtn.UseVisualStyleBackColor = true;
            //
            // buttonled
            //
            this.buttonled.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonled.FlatAppearance.BorderSize = 0;
            this.buttonled.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonled.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonled.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonled.Location = new System.Drawing.Point(0, 382);
            this.buttonled.Name = "buttonled";
            this.buttonled.Size = new System.Drawing.Size(195, 42);
            this.buttonled.TabIndex = 9;
            this.buttonled.Text = "RGB LED";
            this.buttonled.UseVisualStyleBackColor = true;
            //
            // buttonhcsr
            //
            this.buttonhcsr.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonhcsr.FlatAppearance.BorderSize = 0;
            this.buttonhcsr.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonhcsr.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonhcsr.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonhcsr.Location = new System.Drawing.Point(0, 340);
            this.buttonhcsr.Name = "buttonhcsr";
            this.buttonhcsr.Size = new System.Drawing.Size(195, 42);
            this.buttonhcsr.TabIndex = 8;
            this.buttonhcsr.Text = "HCSR-04";
            this.buttonhcsr.UseVisualStyleBackColor = true;
            //
            // buttonir
            //
            this.buttonir.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonir.FlatAppearance.BorderSize = 0;
            this.buttonir.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonir.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonir.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonir.Location = new System.Drawing.Point(0, 298);
            this.buttonir.Name = "buttonir";
            this.buttonir.Size = new System.Drawing.Size(195, 42);
            this.buttonir.TabIndex = 7;
            this.buttonir.Text = "IR Sensör\r\n";
            this.buttonir.UseVisualStyleBackColor = true;
            //
            // buttonldr
            //
            this.buttonldr.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonldr.FlatAppearance.BorderSize = 0;
            this.buttonldr.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonldr.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonldr.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonldr.Location = new System.Drawing.Point(0, 256);
            this.buttonldr.Name = "buttonldr";
            this.buttonldr.Size = new System.Drawing.Size(195, 42);
            this.buttonldr.TabIndex = 6;
            this.buttonldr.Text = "LDR";
            this.buttonldr.UseVisualStyleBackColor = true;
            //
            // buttonlm35
            //
            this.buttonlm35.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonlm35.FlatAppearance.BorderSize = 0;
            this.buttonlm35.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonlm35.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonlm35.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonlm35.Location = new System.Drawing.Point(0, 214);
            this.buttonlm35.Name = "buttonlm35";
            this.buttonlm35.Size = new System.Drawing.Size(195, 42);
            this.buttonlm35.TabIndex = 5;
            this.buttonlm35.Text = "LM35";
            this.buttonlm35.UseVisualStyleBackColor = true;
            this.buttonlm35.Click += new System.EventHandler(this.buttonlm35_Click);
            //
            // buttonlcd
            //
            this.buttonlcd.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonlcd.FlatAppearance.BorderSize = 0;
            this.buttonlcd.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonlcd.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonlcd.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonlcd.Location = new System.Drawing.Point(0, 172);
            this.buttonlcd.Name = "buttonlcd";
            this.buttonlcd.Size = new System.Drawing.Size(195, 42);
            this.buttonlcd.TabIndex = 4;
            this.buttonlcd.Text = "LCD";
            this.buttonlcd.UseVisualStyleBackColor = true;
            this.buttonlcd.Click += new System.EventHandler(this.buttonlcd_Click);
            //
            // buttonPot
            //
            this.buttonPot.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonPot.FlatAppearance.BorderSize = 0;
            this.buttonPot.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonPot.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonPot.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonPot.Location = new System.Drawing.Point(0, 130);
            this.buttonPot.Name = "buttonPot";
            this.buttonPot.Size = new System.Drawing.Size(195, 42);
            this.buttonPot.TabIndex = 3;
            this.buttonPot.Text = "Potansiyometre";
            this.buttonPot.UseVisualStyleBackColor = true;
            this.buttonPot.Click += new System.EventHandler(this.buttonPot_Click);
            //
            // panelY
            //
            this.panelY.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(39)))), ((int)(((byte)(53)))));
            this.panelY.Controls.Add(this.label2);
            this.panelY.Controls.Add(this.label1);
            this.panelY.Controls.Add(this.comboBox1);
            this.panelY.Dock = System.Windows.Forms.DockStyle.Top;
            this.panelY.Location = new System.Drawing.Point(0, 0);
            this.panelY.Margin = new System.Windows.Forms.Padding(4);
            this.panelY.Name = "panelY";
            this.panelY.Size = new System.Drawing.Size(195, 130);
            this.panelY.TabIndex = 2;
            //
            // label2
            //
            this.label2.AutoSize = true;
            this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
            this.label2.Location = new System.Drawing.Point(26, 95);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(0, 20);
            this.label2.TabIndex = 3;
            //
            // label1
            //
            this.label1.AutoSize = true;
            this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(156)))), ((int)(((byte)(149)))));
            this.label1.Location = new System.Drawing.Point(25, 9);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(58, 25);
            this.label1.TabIndex = 2;
            this.label1.Text = "PORT";
            //
            // comboBox1
            //
            this.comboBox1.FormattingEnabled = true;
            this.comboBox1.Location = new System.Drawing.Point(30, 48);
            this.comboBox1.Margin = new System.Windows.Forms.Padding(4);
            this.comboBox1.Name = "comboBox1";
            this.comboBox1.Size = new System.Drawing.Size(147, 33);
            this.comboBox1.TabIndex = 0;
            this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
            //
            // serialPort1
            //
            this.serialPort1.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(this.serialPort1_DataReceived);
            //
            // panelpot
            //
            this.panelpot.Controls.Add(this.panellm);
            this.panelpot.Controls.Add(this.pictureBox1);
            this.panelpot.Controls.Add(this.textBox1);
            this.panelpot.Controls.Add(this.label5);
            this.panelpot.Controls.Add(this.label4);
            this.panelpot.Controls.Add(this.label3);
            this.panelpot.Controls.Add(this.progressBar1);
            this.panelpot.Location = new System.Drawing.Point(202, 12);
            this.panelpot.Name = "panelpot";
            this.panelpot.Size = new System.Drawing.Size(599, 618);
            this.panelpot.TabIndex = 2;
            this.panelpot.Visible = false;
            //
            // pictureBox1
            //
            this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
            this.pictureBox1.Location = new System.Drawing.Point(405, 449);
            this.pictureBox1.Name = "pictureBox1";
            this.pictureBox1.Size = new System.Drawing.Size(110, 90);
            this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
            this.pictureBox1.TabIndex = 5;
            this.pictureBox1.TabStop = false;
            //
            // textBox1
            //
            this.textBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(22)))), ((int)(((byte)(46)))), ((int)(((byte)(59)))));
            this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.textBox1.Location = new System.Drawing.Point(21, 161);
            this.textBox1.Multiline = true;
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(429, 246);
            this.textBox1.TabIndex = 4;
            this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
            //
            // label5
            //
            this.label5.AutoSize = true;
            this.label5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(10)))), ((int)(((byte)(38)))));
            this.label5.Location = new System.Drawing.Point(95, 122);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(22, 25);
            this.label5.TabIndex = 3;
            this.label5.Text = "0";
            //
            // label4
            //
            this.label4.AutoSize = true;
            this.label4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(10)))), ((int)(((byte)(38)))));
            this.label4.Location = new System.Drawing.Point(21, 122);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(77, 25);
            this.label4.TabIndex = 2;
            this.label4.Text = "Değeri :";
            //
            // label3
            //
            this.label3.AutoSize = true;
            this.label3.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(10)))), ((int)(((byte)(38)))));
            this.label3.Location = new System.Drawing.Point(16, 26);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(151, 25);
            this.label3.TabIndex = 1;
            this.label3.Text = "Potansiyometre";
            //
            // progressBar1
            //
            this.progressBar1.ForeColor = System.Drawing.Color.HotPink;
            this.progressBar1.Location = new System.Drawing.Point(21, 69);
            this.progressBar1.Maximum = 1023;
            this.progressBar1.Name = "progressBar1";
            this.progressBar1.Size = new System.Drawing.Size(429, 46);
            this.progressBar1.TabIndex = 0;
            //
            // panellm
            //
            this.panellm.Controls.Add(this.button2);
            this.panellm.Controls.Add(this.button1);
            this.panellm.Location = new System.Drawing.Point(1, 0);
            this.panellm.Name = "panellm";
            this.panellm.Size = new System.Drawing.Size(595, 595);
            this.panellm.TabIndex = 6;
            this.panellm.Visible = false;
            //
            // button1
            //
            this.button1.Location = new System.Drawing.Point(187, 130);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(75, 23);
            this.button1.TabIndex = 0;
            this.button1.Text = "button1";
            this.button1.UseVisualStyleBackColor = true;
            //
            // button2
            //
            this.button2.Location = new System.Drawing.Point(149, 248);
            this.button2.Name = "button2";
            this.button2.Size = new System.Drawing.Size(75, 23);
            this.button2.TabIndex = 1;
            this.button2.Text = "button2";
            this.button2.UseVisualStyleBackColor = true;
            //
            // label6
            //
            this.label6.AutoSize = true;
            this.label6.Location = new System.Drawing.Point(312, 48);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(63, 25);
            this.label6.TabIndex = 3;
            this.label6.Text = "label6";
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 25F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(22)))), ((int)(((byte)(46)))), ((int)(((byte)(59)))));
            this.CausesValidation = false;
            this.ClientSize = new System.Drawing.Size(813, 618);
            this.Controls.Add(this.label6);
            this.Controls.Add(this.panelpot);
            this.Controls.Add(this.panelX);
            this.Cursor = System.Windows.Forms.Cursors.Default;
            this.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
            this.KeyPreview = true;
            this.Margin = new System.Windows.Forms.Padding(5);
            this.Name = "Form1";
            this.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.ShowIcon = false;
            this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
            this.Text = "Form1";
            this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Form1_FormClosed);
            this.Load += new System.EventHandler(this.Form1_Load);
            this.panelX.ResumeLayout(false);
            this.panelY.ResumeLayout(false);
            this.panelY.PerformLayout();
            this.panelpot.ResumeLayout(false);
            this.panelpot.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
            this.panellm.ResumeLayout(false);
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.Panel panelX;
        private System.Windows.Forms.Panel panelY;
        private System.Windows.Forms.ComboBox comboBox1;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.Button buttonPot;
        private System.Windows.Forms.Button buttonbattery;
        private System.Windows.Forms.Button buttonbtn;
        private System.Windows.Forms.Button buttonled;
        private System.Windows.Forms.Button buttonhcsr;
        private System.Windows.Forms.Button buttonir;
        private System.Windows.Forms.Button buttonldr;
        private System.Windows.Forms.Button buttonlm35;
        private System.Windows.Forms.Button buttonlcd;
        private System.IO.Ports.SerialPort serialPort1;
        private System.Windows.Forms.Timer timer1;
        private System.Windows.Forms.Panel panelpot;
        private System.Windows.Forms.ProgressBar progressBar1;
        private System.Windows.Forms.TextBox textBox1;
        private System.Windows.Forms.Label label5;
        private System.Windows.Forms.Label label4;
        private System.Windows.Forms.Label label3;
        private System.Windows.Forms.PictureBox pictureBox1;
        private System.Windows.Forms.Panel panellm;
        private System.Windows.Forms.Button button2;
        private System.Windows.Forms.Button button1;
        private System.Windows.Forms.Label label6;
    }
}
 
Hatalı Kod Bloğu.png


Evet, panellm adlı panel panelpot adlı panel içerisine girmiş ilk satırda görüleceği üzere.

C#:
namespace arduinowithimage
{
    partial class Form1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
            this.panelX = new System.Windows.Forms.Panel();
            this.buttonbattery = new System.Windows.Forms.Button();
            this.buttonbtn = new System.Windows.Forms.Button();
            this.buttonled = new System.Windows.Forms.Button();
            this.buttonhcsr = new System.Windows.Forms.Button();
            this.buttonir = new System.Windows.Forms.Button();
            this.buttonldr = new System.Windows.Forms.Button();
            this.buttonlm35 = new System.Windows.Forms.Button();
            this.buttonlcd = new System.Windows.Forms.Button();
            this.buttonPot = new System.Windows.Forms.Button();
            this.panelY = new System.Windows.Forms.Panel();
            this.label2 = new System.Windows.Forms.Label();
            this.label1 = new System.Windows.Forms.Label();
            this.comboBox1 = new System.Windows.Forms.ComboBox();
            this.serialPort1 = new System.IO.Ports.SerialPort(this.components);
            this.timer1 = new System.Windows.Forms.Timer(this.components);
            this.panelpot = new System.Windows.Forms.Panel();
            this.pictureBox1 = new System.Windows.Forms.PictureBox();
            this.textBox1 = new System.Windows.Forms.TextBox();
            this.label5 = new System.Windows.Forms.Label();
            this.label4 = new System.Windows.Forms.Label();
            this.label3 = new System.Windows.Forms.Label();
            this.progressBar1 = new System.Windows.Forms.ProgressBar();
            this.panellm = new System.Windows.Forms.Panel();
            this.button1 = new System.Windows.Forms.Button();
            this.button2 = new System.Windows.Forms.Button();
            this.label6 = new System.Windows.Forms.Label();
            this.panelX.SuspendLayout();
            this.panelY.SuspendLayout();
            this.panelpot.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
            this.panellm.SuspendLayout();
            this.SuspendLayout();
            //
            // panelX
            //
            this.panelX.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(39)))), ((int)(((byte)(53)))));
            this.panelX.Controls.Add(this.buttonbattery);
            this.panelX.Controls.Add(this.buttonbtn);
            this.panelX.Controls.Add(this.buttonled);
            this.panelX.Controls.Add(this.buttonhcsr);
            this.panelX.Controls.Add(this.buttonir);
            this.panelX.Controls.Add(this.buttonldr);
            this.panelX.Controls.Add(this.buttonlm35);
            this.panelX.Controls.Add(this.buttonlcd);
            this.panelX.Controls.Add(this.buttonPot);
            this.panelX.Dock = System.Windows.Forms.DockStyle.Left;
            this.panelX.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(126)))), ((int)(((byte)(249)))));
            this.panelX.Location = new System.Drawing.Point(0, 0);
            this.panelX.Margin = new System.Windows.Forms.Padding(4);
            this.panelX.Name = "panelX";
            this.panelX.Size = new System.Drawing.Size(195, 618);
            this.panelX.TabIndex = 1;
            //
            // buttonbattery
            //
            this.buttonbattery.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonbattery.FlatAppearance.BorderSize = 0;
            this.buttonbattery.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonbattery.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonbattery.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonbattery.Location = new System.Drawing.Point(0, 466);
            this.buttonbattery.Name = "buttonbattery";
            this.buttonbattery.Size = new System.Drawing.Size(195, 42);
            this.buttonbattery.TabIndex = 11;
            this.buttonbattery.Text = "Pil";
            this.buttonbattery.UseVisualStyleBackColor = true;
            //
            // buttonbtn
            //
            this.buttonbtn.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonbtn.FlatAppearance.BorderSize = 0;
            this.buttonbtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonbtn.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonbtn.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonbtn.Location = new System.Drawing.Point(0, 424);
            this.buttonbtn.Name = "buttonbtn";
            this.buttonbtn.Size = new System.Drawing.Size(195, 42);
            this.buttonbtn.TabIndex = 10;
            this.buttonbtn.Text = "Buton";
            this.buttonbtn.UseVisualStyleBackColor = true;
            //
            // buttonled
            //
            this.buttonled.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonled.FlatAppearance.BorderSize = 0;
            this.buttonled.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonled.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonled.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonled.Location = new System.Drawing.Point(0, 382);
            this.buttonled.Name = "buttonled";
            this.buttonled.Size = new System.Drawing.Size(195, 42);
            this.buttonled.TabIndex = 9;
            this.buttonled.Text = "RGB LED";
            this.buttonled.UseVisualStyleBackColor = true;
            //
            // buttonhcsr
            //
            this.buttonhcsr.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonhcsr.FlatAppearance.BorderSize = 0;
            this.buttonhcsr.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonhcsr.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonhcsr.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonhcsr.Location = new System.Drawing.Point(0, 340);
            this.buttonhcsr.Name = "buttonhcsr";
            this.buttonhcsr.Size = new System.Drawing.Size(195, 42);
            this.buttonhcsr.TabIndex = 8;
            this.buttonhcsr.Text = "HCSR-04";
            this.buttonhcsr.UseVisualStyleBackColor = true;
            //
            // buttonir
            //
            this.buttonir.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonir.FlatAppearance.BorderSize = 0;
            this.buttonir.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonir.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonir.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonir.Location = new System.Drawing.Point(0, 298);
            this.buttonir.Name = "buttonir";
            this.buttonir.Size = new System.Drawing.Size(195, 42);
            this.buttonir.TabIndex = 7;
            this.buttonir.Text = "IR Sensör\r\n";
            this.buttonir.UseVisualStyleBackColor = true;
            //
            // buttonldr
            //
            this.buttonldr.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonldr.FlatAppearance.BorderSize = 0;
            this.buttonldr.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonldr.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonldr.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonldr.Location = new System.Drawing.Point(0, 256);
            this.buttonldr.Name = "buttonldr";
            this.buttonldr.Size = new System.Drawing.Size(195, 42);
            this.buttonldr.TabIndex = 6;
            this.buttonldr.Text = "LDR";
            this.buttonldr.UseVisualStyleBackColor = true;
            //
            // buttonlm35
            //
            this.buttonlm35.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonlm35.FlatAppearance.BorderSize = 0;
            this.buttonlm35.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonlm35.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonlm35.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonlm35.Location = new System.Drawing.Point(0, 214);
            this.buttonlm35.Name = "buttonlm35";
            this.buttonlm35.Size = new System.Drawing.Size(195, 42);
            this.buttonlm35.TabIndex = 5;
            this.buttonlm35.Text = "LM35";
            this.buttonlm35.UseVisualStyleBackColor = true;
            this.buttonlm35.Click += new System.EventHandler(this.buttonlm35_Click);
            //
            // buttonlcd
            //
            this.buttonlcd.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonlcd.FlatAppearance.BorderSize = 0;
            this.buttonlcd.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonlcd.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonlcd.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonlcd.Location = new System.Drawing.Point(0, 172);
            this.buttonlcd.Name = "buttonlcd";
            this.buttonlcd.Size = new System.Drawing.Size(195, 42);
            this.buttonlcd.TabIndex = 4;
            this.buttonlcd.Text = "LCD";
            this.buttonlcd.UseVisualStyleBackColor = true;
            this.buttonlcd.Click += new System.EventHandler(this.buttonlcd_Click);
            //
            // buttonPot
            //
            this.buttonPot.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonPot.FlatAppearance.BorderSize = 0;
            this.buttonPot.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonPot.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonPot.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonPot.Location = new System.Drawing.Point(0, 130);
            this.buttonPot.Name = "buttonPot";
            this.buttonPot.Size = new System.Drawing.Size(195, 42);
            this.buttonPot.TabIndex = 3;
            this.buttonPot.Text = "Potansiyometre";
            this.buttonPot.UseVisualStyleBackColor = true;
            this.buttonPot.Click += new System.EventHandler(this.buttonPot_Click);
            //
            // panelY
            //
            this.panelY.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(39)))), ((int)(((byte)(53)))));
            this.panelY.Controls.Add(this.label2);
            this.panelY.Controls.Add(this.label1);
            this.panelY.Controls.Add(this.comboBox1);
            this.panelY.Dock = System.Windows.Forms.DockStyle.Top;
            this.panelY.Location = new System.Drawing.Point(0, 0);
            this.panelY.Margin = new System.Windows.Forms.Padding(4);
            this.panelY.Name = "panelY";
            this.panelY.Size = new System.Drawing.Size(195, 130);
            this.panelY.TabIndex = 2;
            //
            // label2
            //
            this.label2.AutoSize = true;
            this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
            this.label2.Location = new System.Drawing.Point(26, 95);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(0, 20);
            this.label2.TabIndex = 3;
            //
            // label1
            //
            this.label1.AutoSize = true;
            this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(156)))), ((int)(((byte)(149)))));
            this.label1.Location = new System.Drawing.Point(25, 9);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(58, 25);
            this.label1.TabIndex = 2;
            this.label1.Text = "PORT";
            //
            // comboBox1
            //
            this.comboBox1.FormattingEnabled = true;
            this.comboBox1.Location = new System.Drawing.Point(30, 48);
            this.comboBox1.Margin = new System.Windows.Forms.Padding(4);
            this.comboBox1.Name = "comboBox1";
            this.comboBox1.Size = new System.Drawing.Size(147, 33);
            this.comboBox1.TabIndex = 0;
            this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
            //
            // serialPort1
            //
            this.serialPort1.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(this.serialPort1_DataReceived);
            //
            // panelpot
            //
            this.panelpot.Controls.Add(this.pictureBox1);
            this.panelpot.Controls.Add(this.textBox1);
            this.panelpot.Controls.Add(this.label5);
            this.panelpot.Controls.Add(this.label4);
            this.panelpot.Controls.Add(this.label3);
            this.panelpot.Controls.Add(this.progressBar1);
            this.panelpot.Location = new System.Drawing.Point(202, 12);
            this.panelpot.Name = "panelpot";
            this.panelpot.Size = new System.Drawing.Size(599, 618);
            this.panelpot.TabIndex = 2;
            this.panelpot.Visible = false;
            //
            // pictureBox1
            //
            this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
            this.pictureBox1.Location = new System.Drawing.Point(405, 449);
            this.pictureBox1.Name = "pictureBox1";
            this.pictureBox1.Size = new System.Drawing.Size(110, 90);
            this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
            this.pictureBox1.TabIndex = 5;
            this.pictureBox1.TabStop = false;
            //
            // textBox1
            //
            this.textBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(22)))), ((int)(((byte)(46)))), ((int)(((byte)(59)))));
            this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.textBox1.Location = new System.Drawing.Point(21, 161);
            this.textBox1.Multiline = true;
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(429, 246);
            this.textBox1.TabIndex = 4;
            this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
            //
            // label5
            //
            this.label5.AutoSize = true;
            this.label5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(10)))), ((int)(((byte)(38)))));
            this.label5.Location = new System.Drawing.Point(95, 122);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(22, 25);
            this.label5.TabIndex = 3;
            this.label5.Text = "0";
            //
            // label4
            //
            this.label4.AutoSize = true;
            this.label4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(10)))), ((int)(((byte)(38)))));
            this.label4.Location = new System.Drawing.Point(21, 122);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(77, 25);
            this.label4.TabIndex = 2;
            this.label4.Text = "Değeri :";
            //
            // label3
            //
            this.label3.AutoSize = true;
            this.label3.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(10)))), ((int)(((byte)(38)))));
            this.label3.Location = new System.Drawing.Point(16, 26);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(151, 25);
            this.label3.TabIndex = 1;
            this.label3.Text = "Potansiyometre";
            //
            // progressBar1
            //
            this.progressBar1.ForeColor = System.Drawing.Color.HotPink;
            this.progressBar1.Location = new System.Drawing.Point(21, 69);
            this.progressBar1.Maximum = 1023;
            this.progressBar1.Name = "progressBar1";
            this.progressBar1.Size = new System.Drawing.Size(429, 46);
            this.progressBar1.TabIndex = 0;
            //
            // panellm
            //
            this.panellm.Controls.Add(this.button2);
            this.panellm.Controls.Add(this.button1);
            this.panellm.Location = new System.Drawing.Point(1, 0);
            this.panellm.Name = "panellm";
            this.panellm.Size = new System.Drawing.Size(595, 595);
            this.panellm.TabIndex = 6;
            this.panellm.Visible = false;
            //
            // button1
            //
            this.button1.Location = new System.Drawing.Point(187, 130);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(75, 23);
            this.button1.TabIndex = 0;
            this.button1.Text = "button1";
            this.button1.UseVisualStyleBackColor = true;
            //
            // button2
            //
            this.button2.Location = new System.Drawing.Point(149, 248);
            this.button2.Name = "button2";
            this.button2.Size = new System.Drawing.Size(75, 23);
            this.button2.TabIndex = 1;
            this.button2.Text = "button2";
            this.button2.UseVisualStyleBackColor = true;
            //
            // label6
            //
            this.label6.AutoSize = true;
            this.label6.Location = new System.Drawing.Point(312, 48);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(63, 25);
            this.label6.TabIndex = 3;
            this.label6.Text = "label6";
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 25F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(22)))), ((int)(((byte)(46)))), ((int)(((byte)(59)))));
            this.CausesValidation = false;
            this.ClientSize = new System.Drawing.Size(813, 618);
            this.Controls.Add(this.label6);
            this.Controls.Add(this.panelpot);
            this.Controls.Add(this.panelX);
            this.Controls.Add(this.panelY);
            this.Controls.Add(this.panellm);
            this.Cursor = System.Windows.Forms.Cursors.Default;
            this.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
            this.KeyPreview = true;
            this.Margin = new System.Windows.Forms.Padding(5);
            this.Name = "Form1";
            this.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.ShowIcon = false;
            this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
            this.Text = "Form1";
            this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Form1_FormClosed);
            this.Load += new System.EventHandler(this.Form1_Load);
            this.panelX.ResumeLayout(false);
            this.panelY.ResumeLayout(false);
            this.panelY.PerformLayout();
            this.panelpot.ResumeLayout(false);
            this.panelpot.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
            this.panellm.ResumeLayout(false);
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.Panel panelX;
        private System.Windows.Forms.Panel panelY;
        private System.Windows.Forms.ComboBox comboBox1;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.Button buttonPot;
        private System.Windows.Forms.Button buttonbattery;
        private System.Windows.Forms.Button buttonbtn;
        private System.Windows.Forms.Button buttonled;
        private System.Windows.Forms.Button buttonhcsr;
        private System.Windows.Forms.Button buttonir;
        private System.Windows.Forms.Button buttonldr;
        private System.Windows.Forms.Button buttonlm35;
        private System.Windows.Forms.Button buttonlcd;
        private System.IO.Ports.SerialPort serialPort1;
        private System.Windows.Forms.Timer timer1;
        private System.Windows.Forms.Panel panelpot;
        private System.Windows.Forms.ProgressBar progressBar1;
        private System.Windows.Forms.TextBox textBox1;
        private System.Windows.Forms.Label label5;
        private System.Windows.Forms.Label label4;
        private System.Windows.Forms.Label label3;
        private System.Windows.Forms.PictureBox pictureBox1;
        private System.Windows.Forms.Panel panellm;
        private System.Windows.Forms.Button button2;
        private System.Windows.Forms.Button button1;
        private System.Windows.Forms.Label label6;
    }
}

Kodu bununla değiştirir misiniz?
 
Çözüm
Eki Görüntüle 1032129

Evet, panellm adlı panel panelpot adlı panel içerisine girmiş ilk satırda görüleceği üzere.

C#:
namespace arduinowithimage
{
    partial class Form1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
            this.panelX = new System.Windows.Forms.Panel();
            this.buttonbattery = new System.Windows.Forms.Button();
            this.buttonbtn = new System.Windows.Forms.Button();
            this.buttonled = new System.Windows.Forms.Button();
            this.buttonhcsr = new System.Windows.Forms.Button();
            this.buttonir = new System.Windows.Forms.Button();
            this.buttonldr = new System.Windows.Forms.Button();
            this.buttonlm35 = new System.Windows.Forms.Button();
            this.buttonlcd = new System.Windows.Forms.Button();
            this.buttonPot = new System.Windows.Forms.Button();
            this.panelY = new System.Windows.Forms.Panel();
            this.label2 = new System.Windows.Forms.Label();
            this.label1 = new System.Windows.Forms.Label();
            this.comboBox1 = new System.Windows.Forms.ComboBox();
            this.serialPort1 = new System.IO.Ports.SerialPort(this.components);
            this.timer1 = new System.Windows.Forms.Timer(this.components);
            this.panelpot = new System.Windows.Forms.Panel();
            this.pictureBox1 = new System.Windows.Forms.PictureBox();
            this.textBox1 = new System.Windows.Forms.TextBox();
            this.label5 = new System.Windows.Forms.Label();
            this.label4 = new System.Windows.Forms.Label();
            this.label3 = new System.Windows.Forms.Label();
            this.progressBar1 = new System.Windows.Forms.ProgressBar();
            this.panellm = new System.Windows.Forms.Panel();
            this.button1 = new System.Windows.Forms.Button();
            this.button2 = new System.Windows.Forms.Button();
            this.label6 = new System.Windows.Forms.Label();
            this.panelX.SuspendLayout();
            this.panelY.SuspendLayout();
            this.panelpot.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
            this.panellm.SuspendLayout();
            this.SuspendLayout();
            //
            // panelX
            //
            this.panelX.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(39)))), ((int)(((byte)(53)))));
            this.panelX.Controls.Add(this.buttonbattery);
            this.panelX.Controls.Add(this.buttonbtn);
            this.panelX.Controls.Add(this.buttonled);
            this.panelX.Controls.Add(this.buttonhcsr);
            this.panelX.Controls.Add(this.buttonir);
            this.panelX.Controls.Add(this.buttonldr);
            this.panelX.Controls.Add(this.buttonlm35);
            this.panelX.Controls.Add(this.buttonlcd);
            this.panelX.Controls.Add(this.buttonPot);
            this.panelX.Dock = System.Windows.Forms.DockStyle.Left;
            this.panelX.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(126)))), ((int)(((byte)(249)))));
            this.panelX.Location = new System.Drawing.Point(0, 0);
            this.panelX.Margin = new System.Windows.Forms.Padding(4);
            this.panelX.Name = "panelX";
            this.panelX.Size = new System.Drawing.Size(195, 618);
            this.panelX.TabIndex = 1;
            //
            // buttonbattery
            //
            this.buttonbattery.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonbattery.FlatAppearance.BorderSize = 0;
            this.buttonbattery.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonbattery.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonbattery.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonbattery.Location = new System.Drawing.Point(0, 466);
            this.buttonbattery.Name = "buttonbattery";
            this.buttonbattery.Size = new System.Drawing.Size(195, 42);
            this.buttonbattery.TabIndex = 11;
            this.buttonbattery.Text = "Pil";
            this.buttonbattery.UseVisualStyleBackColor = true;
            //
            // buttonbtn
            //
            this.buttonbtn.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonbtn.FlatAppearance.BorderSize = 0;
            this.buttonbtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonbtn.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonbtn.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonbtn.Location = new System.Drawing.Point(0, 424);
            this.buttonbtn.Name = "buttonbtn";
            this.buttonbtn.Size = new System.Drawing.Size(195, 42);
            this.buttonbtn.TabIndex = 10;
            this.buttonbtn.Text = "Buton";
            this.buttonbtn.UseVisualStyleBackColor = true;
            //
            // buttonled
            //
            this.buttonled.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonled.FlatAppearance.BorderSize = 0;
            this.buttonled.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonled.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonled.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonled.Location = new System.Drawing.Point(0, 382);
            this.buttonled.Name = "buttonled";
            this.buttonled.Size = new System.Drawing.Size(195, 42);
            this.buttonled.TabIndex = 9;
            this.buttonled.Text = "RGB LED";
            this.buttonled.UseVisualStyleBackColor = true;
            //
            // buttonhcsr
            //
            this.buttonhcsr.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonhcsr.FlatAppearance.BorderSize = 0;
            this.buttonhcsr.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonhcsr.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonhcsr.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonhcsr.Location = new System.Drawing.Point(0, 340);
            this.buttonhcsr.Name = "buttonhcsr";
            this.buttonhcsr.Size = new System.Drawing.Size(195, 42);
            this.buttonhcsr.TabIndex = 8;
            this.buttonhcsr.Text = "HCSR-04";
            this.buttonhcsr.UseVisualStyleBackColor = true;
            //
            // buttonir
            //
            this.buttonir.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonir.FlatAppearance.BorderSize = 0;
            this.buttonir.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonir.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonir.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonir.Location = new System.Drawing.Point(0, 298);
            this.buttonir.Name = "buttonir";
            this.buttonir.Size = new System.Drawing.Size(195, 42);
            this.buttonir.TabIndex = 7;
            this.buttonir.Text = "IR Sensör\r\n";
            this.buttonir.UseVisualStyleBackColor = true;
            //
            // buttonldr
            //
            this.buttonldr.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonldr.FlatAppearance.BorderSize = 0;
            this.buttonldr.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonldr.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonldr.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonldr.Location = new System.Drawing.Point(0, 256);
            this.buttonldr.Name = "buttonldr";
            this.buttonldr.Size = new System.Drawing.Size(195, 42);
            this.buttonldr.TabIndex = 6;
            this.buttonldr.Text = "LDR";
            this.buttonldr.UseVisualStyleBackColor = true;
            //
            // buttonlm35
            //
            this.buttonlm35.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonlm35.FlatAppearance.BorderSize = 0;
            this.buttonlm35.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonlm35.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonlm35.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonlm35.Location = new System.Drawing.Point(0, 214);
            this.buttonlm35.Name = "buttonlm35";
            this.buttonlm35.Size = new System.Drawing.Size(195, 42);
            this.buttonlm35.TabIndex = 5;
            this.buttonlm35.Text = "LM35";
            this.buttonlm35.UseVisualStyleBackColor = true;
            this.buttonlm35.Click += new System.EventHandler(this.buttonlm35_Click);
            //
            // buttonlcd
            //
            this.buttonlcd.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonlcd.FlatAppearance.BorderSize = 0;
            this.buttonlcd.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonlcd.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonlcd.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonlcd.Location = new System.Drawing.Point(0, 172);
            this.buttonlcd.Name = "buttonlcd";
            this.buttonlcd.Size = new System.Drawing.Size(195, 42);
            this.buttonlcd.TabIndex = 4;
            this.buttonlcd.Text = "LCD";
            this.buttonlcd.UseVisualStyleBackColor = true;
            this.buttonlcd.Click += new System.EventHandler(this.buttonlcd_Click);
            //
            // buttonPot
            //
            this.buttonPot.Dock = System.Windows.Forms.DockStyle.Top;
            this.buttonPot.FlatAppearance.BorderSize = 0;
            this.buttonPot.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonPot.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonPot.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(166)))));
            this.buttonPot.Location = new System.Drawing.Point(0, 130);
            this.buttonPot.Name = "buttonPot";
            this.buttonPot.Size = new System.Drawing.Size(195, 42);
            this.buttonPot.TabIndex = 3;
            this.buttonPot.Text = "Potansiyometre";
            this.buttonPot.UseVisualStyleBackColor = true;
            this.buttonPot.Click += new System.EventHandler(this.buttonPot_Click);
            //
            // panelY
            //
            this.panelY.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(39)))), ((int)(((byte)(53)))));
            this.panelY.Controls.Add(this.label2);
            this.panelY.Controls.Add(this.label1);
            this.panelY.Controls.Add(this.comboBox1);
            this.panelY.Dock = System.Windows.Forms.DockStyle.Top;
            this.panelY.Location = new System.Drawing.Point(0, 0);
            this.panelY.Margin = new System.Windows.Forms.Padding(4);
            this.panelY.Name = "panelY";
            this.panelY.Size = new System.Drawing.Size(195, 130);
            this.panelY.TabIndex = 2;
            //
            // label2
            //
            this.label2.AutoSize = true;
            this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
            this.label2.Location = new System.Drawing.Point(26, 95);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(0, 20);
            this.label2.TabIndex = 3;
            //
            // label1
            //
            this.label1.AutoSize = true;
            this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(156)))), ((int)(((byte)(149)))));
            this.label1.Location = new System.Drawing.Point(25, 9);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(58, 25);
            this.label1.TabIndex = 2;
            this.label1.Text = "PORT";
            //
            // comboBox1
            //
            this.comboBox1.FormattingEnabled = true;
            this.comboBox1.Location = new System.Drawing.Point(30, 48);
            this.comboBox1.Margin = new System.Windows.Forms.Padding(4);
            this.comboBox1.Name = "comboBox1";
            this.comboBox1.Size = new System.Drawing.Size(147, 33);
            this.comboBox1.TabIndex = 0;
            this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
            //
            // serialPort1
            //
            this.serialPort1.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(this.serialPort1_DataReceived);
            //
            // panelpot
            //
            this.panelpot.Controls.Add(this.pictureBox1);
            this.panelpot.Controls.Add(this.textBox1);
            this.panelpot.Controls.Add(this.label5);
            this.panelpot.Controls.Add(this.label4);
            this.panelpot.Controls.Add(this.label3);
            this.panelpot.Controls.Add(this.progressBar1);
            this.panelpot.Location = new System.Drawing.Point(202, 12);
            this.panelpot.Name = "panelpot";
            this.panelpot.Size = new System.Drawing.Size(599, 618);
            this.panelpot.TabIndex = 2;
            this.panelpot.Visible = false;
            //
            // pictureBox1
            //
            this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
            this.pictureBox1.Location = new System.Drawing.Point(405, 449);
            this.pictureBox1.Name = "pictureBox1";
            this.pictureBox1.Size = new System.Drawing.Size(110, 90);
            this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
            this.pictureBox1.TabIndex = 5;
            this.pictureBox1.TabStop = false;
            //
            // textBox1
            //
            this.textBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(22)))), ((int)(((byte)(46)))), ((int)(((byte)(59)))));
            this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.textBox1.Location = new System.Drawing.Point(21, 161);
            this.textBox1.Multiline = true;
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(429, 246);
            this.textBox1.TabIndex = 4;
            this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
            //
            // label5
            //
            this.label5.AutoSize = true;
            this.label5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(10)))), ((int)(((byte)(38)))));
            this.label5.Location = new System.Drawing.Point(95, 122);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(22, 25);
            this.label5.TabIndex = 3;
            this.label5.Text = "0";
            //
            // label4
            //
            this.label4.AutoSize = true;
            this.label4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(10)))), ((int)(((byte)(38)))));
            this.label4.Location = new System.Drawing.Point(21, 122);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(77, 25);
            this.label4.TabIndex = 2;
            this.label4.Text = "Değeri :";
            //
            // label3
            //
            this.label3.AutoSize = true;
            this.label3.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(10)))), ((int)(((byte)(38)))));
            this.label3.Location = new System.Drawing.Point(16, 26);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(151, 25);
            this.label3.TabIndex = 1;
            this.label3.Text = "Potansiyometre";
            //
            // progressBar1
            //
            this.progressBar1.ForeColor = System.Drawing.Color.HotPink;
            this.progressBar1.Location = new System.Drawing.Point(21, 69);
            this.progressBar1.Maximum = 1023;
            this.progressBar1.Name = "progressBar1";
            this.progressBar1.Size = new System.Drawing.Size(429, 46);
            this.progressBar1.TabIndex = 0;
            //
            // panellm
            //
            this.panellm.Controls.Add(this.button2);
            this.panellm.Controls.Add(this.button1);
            this.panellm.Location = new System.Drawing.Point(1, 0);
            this.panellm.Name = "panellm";
            this.panellm.Size = new System.Drawing.Size(595, 595);
            this.panellm.TabIndex = 6;
            this.panellm.Visible = false;
            //
            // button1
            //
            this.button1.Location = new System.Drawing.Point(187, 130);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(75, 23);
            this.button1.TabIndex = 0;
            this.button1.Text = "button1";
            this.button1.UseVisualStyleBackColor = true;
            //
            // button2
            //
            this.button2.Location = new System.Drawing.Point(149, 248);
            this.button2.Name = "button2";
            this.button2.Size = new System.Drawing.Size(75, 23);
            this.button2.TabIndex = 1;
            this.button2.Text = "button2";
            this.button2.UseVisualStyleBackColor = true;
            //
            // label6
            //
            this.label6.AutoSize = true;
            this.label6.Location = new System.Drawing.Point(312, 48);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(63, 25);
            this.label6.TabIndex = 3;
            this.label6.Text = "label6";
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 25F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(22)))), ((int)(((byte)(46)))), ((int)(((byte)(59)))));
            this.CausesValidation = false;
            this.ClientSize = new System.Drawing.Size(813, 618);
            this.Controls.Add(this.label6);
            this.Controls.Add(this.panelpot);
            this.Controls.Add(this.panelX);
            this.Controls.Add(this.panelY);
            this.Controls.Add(this.panellm);
            this.Cursor = System.Windows.Forms.Cursors.Default;
            this.Font = new System.Drawing.Font("Nirmala UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
            this.KeyPreview = true;
            this.Margin = new System.Windows.Forms.Padding(5);
            this.Name = "Form1";
            this.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.ShowIcon = false;
            this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
            this.Text = "Form1";
            this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Form1_FormClosed);
            this.Load += new System.EventHandler(this.Form1_Load);
            this.panelX.ResumeLayout(false);
            this.panelY.ResumeLayout(false);
            this.panelY.PerformLayout();
            this.panelpot.ResumeLayout(false);
            this.panelpot.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
            this.panellm.ResumeLayout(false);
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.Panel panelX;
        private System.Windows.Forms.Panel panelY;
        private System.Windows.Forms.ComboBox comboBox1;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.Button buttonPot;
        private System.Windows.Forms.Button buttonbattery;
        private System.Windows.Forms.Button buttonbtn;
        private System.Windows.Forms.Button buttonled;
        private System.Windows.Forms.Button buttonhcsr;
        private System.Windows.Forms.Button buttonir;
        private System.Windows.Forms.Button buttonldr;
        private System.Windows.Forms.Button buttonlm35;
        private System.Windows.Forms.Button buttonlcd;
        private System.IO.Ports.SerialPort serialPort1;
        private System.Windows.Forms.Timer timer1;
        private System.Windows.Forms.Panel panelpot;
        private System.Windows.Forms.ProgressBar progressBar1;
        private System.Windows.Forms.TextBox textBox1;
        private System.Windows.Forms.Label label5;
        private System.Windows.Forms.Label label4;
        private System.Windows.Forms.Label label3;
        private System.Windows.Forms.PictureBox pictureBox1;
        private System.Windows.Forms.Panel panellm;
        private System.Windows.Forms.Button button2;
        private System.Windows.Forms.Button button1;
        private System.Windows.Forms.Label label6;
    }
}

Kodu bununla değiştirir misiniz?
Hemen deniyorum hocam.
Teşekkür ederim sorunsuz çalışıyor ekleyeceğim her panel için düzeltme yapmam mı gerek gösterdiğiniz gibi?
 

Yeni konular

Geri
Yukarı