I have this designer with splitContainer1 and splitcontainer2 and splitContainer2.Panel2 how can i d

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I tried Fixed and other things. What i mean is when im running the program the user can change the split area on the left side.
How can i disable it ?

This is the Designer code:


<div style="color:Black;background-color:White; <pre>
<span style="color:Blue; namespace WindowsFormsApplication1
{
<span style="color:Blue; partial <span style="color:Blue; class Picturebox1_Fullscreen
{
<span style="color:Gray; /// <span style="color:Gray; <summary>
<span style="color:Gray; ///<span style="color:Green; Required designer variable.
<span style="color:Gray; /// <span style="color:Gray; </summary>
<span style="color:Blue; private System.ComponentModel.IContainer components = <span style="color:Blue; null;

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

<span style="color:Blue; #region Windows Form Designer generated code

<span style="color:Gray; /// <span style="color:Gray; <summary>
<span style="color:Gray; ///<span style="color:Green; Required method for Designer support - do not modify
<span style="color:Gray; ///<span style="color:Green; the contents of this method with the code editor.
<span style="color:Gray; /// <span style="color:Gray; </summary>
<span style="color:Blue; private <span style="color:Blue; void InitializeComponent()
{
<span style="color:Blue; this.components = <span style="color:Blue; new System.ComponentModel.Container();
<span style="color:Blue; this.splitContainer1 = <span style="color:Blue; new System.Windows.Forms.SplitContainer();
<span style="color:Blue; this.splitContainer2 = <span style="color:Blue; new System.Windows.Forms.SplitContainer();
<span style="color:Blue; this.pictureBox1 = <span style="color:Blue; new System.Windows.Forms.PictureBox();
<span style="color:Blue; this.label3 = <span style="color:Blue; new System.Windows.Forms.Label();
<span style="color:Blue; this.trackBar1 = <span style="color:Blue; new System.Windows.Forms.TrackBar();
<span style="color:Blue; this.label2 = <span style="color:Blue; new System.Windows.Forms.Label();
<span style="color:Blue; this.label1 = <span style="color:Blue; new System.Windows.Forms.Label();
<span style="color:Blue; this.textBox3 = <span style="color:Blue; new System.Windows.Forms.TextBox();
<span style="color:Blue; this.textBox2 = <span style="color:Blue; new System.Windows.Forms.TextBox();
<span style="color:Blue; this.textBox1 = <span style="color:Blue; new System.Windows.Forms.TextBox();
<span style="color:Blue; this.trackBar2 = <span style="color:Blue; new System.Windows.Forms.TrackBar();
<span style="color:Blue; this.timer1 = <span style="color:Blue; new System.Windows.Forms.Timer(<span style="color:Blue; this.components);
<span style="color:Blue; this.timer2 = <span style="color:Blue; new System.Windows.Forms.Timer(<span style="color:Blue; this.components);
<span style="color:Blue; this.timer3 = <span style="color:Blue; new System.Windows.Forms.Timer(<span style="color:Blue; this.components);
((System.ComponentModel.ISupportInitialize)(<span style="color:Blue; this.splitContainer1)).BeginInit();
<span style="color:Blue; this.splitContainer1.Panel1.SuspendLayout();
<span style="color:Blue; this.splitContainer1.Panel2.SuspendLayout();
<span style="color:Blue; this.splitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(<span style="color:Blue; this.splitContainer2)).BeginInit();
<span style="color:Blue; this.splitContainer2.Panel1.SuspendLayout();
<span style="color:Blue; this.splitContainer2.Panel2.SuspendLayout();
<span style="color:Blue; this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(<span style="color:Blue; this.pictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(<span style="color:Blue; this.trackBar1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(<span style="color:Blue; this.trackBar2)).BeginInit();
<span style="color:Blue; this.SuspendLayout();
<span style="color:Green; //
<span style="color:Green; // splitContainer1
<span style="color:Green; //
<span style="color:Blue; this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
<span style="color:Blue; this.splitContainer1.Location = <span style="color:Blue; new System.Drawing.Point(0, 0);
<span style="color:Blue; this.splitContainer1.Name = <span style="color:#A31515; "splitContainer1";
<span style="color:Green; //
<span style="color:Green; // splitContainer1.Panel1
<span style="color:Green; //
<span style="color:Blue; this.splitContainer1.Panel1.Controls.Add(<span style="color:Blue; this.splitContainer2);
<span style="color:Blue; this.splitContainer1.Panel1.DoubleClick += <span style="color:Blue; new System.EventHandler(<span style="color:Blue; this.splitContainer1_Panel1_DoubleClick);
<span style="color:Green; //
<span style="color:Green; // splitContainer1.Panel2
<span style="color:Green; //
<span style="color:Blue; this.splitContainer1.Panel2.Controls.Add(<span style="color:Blue; this.label1);
<span style="color:Blue; this.splitContainer1.Panel2.Controls.Add(<span style="color:Blue; this.textBox3);
<span style="color:Blue; this.splitContainer1.Panel2.Controls.Add(<span style="color:Blue; this.textBox2);
<span style="color:Blue; this.splitContainer1.Panel2.Controls.Add(<span style="color:Blue; this.textBox1);
<span style="color:Blue; this.splitContainer1.Panel2.Controls.Add(<span style="color:Blue; this.trackBar2);
<span style="color:Blue; this.splitContainer1.Panel2.DoubleClick += <span style="color:Blue; new System.EventHandler(<span style="color:Blue; this.splitContainer1_Panel2_DoubleClick);
<span style="color:Blue; this.splitContainer1.Panel2.MouseMove += <span style="color:Blue; new System.Windows.Forms.MouseEventHandler(<span style="color:Blue; this.splitContainer1_Panel2_MouseMove);
<span style="color:Blue; this.splitContainer1.Size = <span style="color:Blue; new System.Drawing.Size(1625, 634);
<span style="color:Blue; this.splitContainer1.SplitterDistance = 1335;
<span style="color:Blue; this.splitContainer1.TabIndex = 0;
<span style="color:Green; //
<span style="color:Green; // splitContainer2
<span style="color:Green; //
<span style="color:Blue; this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
<span style="color:Blue; this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
<span style="color:Blue; this.splitContainer2.IsSplitterFixed = <span style="color:Blue; true;
<span style="color:Blue; this.splitContainer2.Location = <span style="color:Blue; new System.Drawing.Point(0, 0);
<span style="color:Blue; this.splitContainer2.Name = <span style="color:#A31515; "splitContainer2";
<span style="color:Blue; this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
<span style="color:Green; //
<span style="color:Green; // splitContainer2.Panel1
<span style="color:Green; //
<span style="color:Blue; this.splitContainer2.Panel1.AutoScroll = <span style="color:Blue; true;
<span style="color:Blue; this.splitContainer2.Panel1.Controls.Add(<span style="color:Blue; this.pictureBox1);
<span style="color:Green; //
<span style="color:Green; // splitContainer2.Panel2
<span style="color:Green; //
<span style="color:Blue; this.splitContainer2.Panel2.Controls.Add(<span style="color:Blue; this.label3);
<span style="color:Blue; this.splitContainer2.Panel2.Controls.Add(<span style="color:Blue; this.trackBar1);
<span style="color:Blue; this.splitContainer2.Panel2.Controls.Add(<span style="color:Blue; this.label2);
<span style="color:Blue; this.splitContainer2.Size = <span style="color:Blue; new System.Drawing.Size(1335, 634);
<span style="color:Blue; this.splitContainer2.SplitterDistance = 544;
<span style="color:Blue; this.splitContainer2.TabIndex = 3;
<span style="color:Green; //
<span style="color:Green; // pictureBox1
<span style="color:Green; //
<span style="color:Blue; this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
<span style="color:Blue; this.pictureBox1.Location = <span style="color:Blue; new System.Drawing.Point(0, 0);
<span style="color:Blue; this.pictureBox1.Name = <span style="color:#A31515; "pictureBox1";
<span style="color:Blue; this.pictureBox1.Size = <span style="color:Blue; new System.Drawing.Size(1335, 544);
<span style="color:Blue; this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
<span style="color:Blue; this.pictureBox1.TabIndex = 0;
<span style="color:Blue; this.pictureBox1.TabStop = <span style="color:Blue; false;
<span style="color:Blue; this.pictureBox1.DoubleClick += <span style="color:Blue; new System.EventHandler(<span style="color:Blue; this.pictureBox1_DoubleClick);
<span style="color:Green; //
<span style="color:Green; // label3
<span style="color:Green; //
<span style="color:Blue; this.label3.AutoSize = <span style="color:Blue; true;
<span style="color:Blue; this.label3.Location = <span style="color:Blue; new System.Drawing.Point(314, 13);
<span style="color:Blue; this.label3.Name = <span style="color:#A31515; "label3";
<span style="color:Blue; this.label3.Size = <span style="color:Blue; new System.Drawing.Size(35, 13);
<span style="color:Blue; this.label3.TabIndex = 6;
<span style="color:Blue; this.label3.Text = <span style="color:#A31515; "label3";
<span style="color:Green; //
<span style="color:Green; // trackBar1
<span style="color:Green; //
<span style="color:Blue; this.trackBar1.Location = <span style="color:Blue; new System.Drawing.Point(9, 29);
<span style="color:Blue; this.trackBar1.Name = <span style="color:#A31515; "trackBar1";
<span style="color:Blue; this.trackBar1.Size = <span style="color:Blue; new System.Drawing.Size(1323, 45);
<span style="color:Blue; this.trackBar1.TabIndex = 0;
<span style="color:Blue; this.trackBar1.Scroll += <span style="color:Blue; new System.EventHandler(<span style="color:Blue; this.trackBar1_Scroll);
<span style="color:Blue; this.trackBar1.Enter += <span style="color:Blue; new System.EventHandler(<span style="color:Blue; this.trackBar1_Enter);
<span style="color:Green; //
<span style="color:Green; // label2
<span style="color:Green; //
<span style="color:Blue; this.label2.AutoSize = <span style="color:Blue; true;
<span style="color:Blue; this.label2.Location = <span style="color:Blue; new System.Drawing.Point(12, 13);
<span style="color:Blue; this.label2.Name = <span style="color:#A31515; "label2";
<span style="color:Blue; this.label2.Size = <span style="color:Blue; new System.Drawing.Size(35, 13);
<span style="color:Blue; this.label2.TabIndex = 2;
<span style="color:Blue; this.label2.Text = <span style="color:#A31515; "label2";
<span style="color:Green; //
<span style="color:Green; // label1
<span style="color:Green; //
<span style="color:Blue; this.label1.AutoSize = <span style="color:Blue; true;
<span style="color:Blue; this.label1.ForeColor = System.Drawing.Color.Red;
<span style="color:Blue; this.label1.Location = <span style="color:Blue; new System.Drawing.Point(81, 609);
<span style="color:Blue; this.label1.Name = <span style="color:#A31515; "label1";
<span style="color:Blue; this.label1.Size = <span style="color:Blue; new System.Drawing.Size(159, 13);
<span style="color:Blue; this.label1.TabIndex = 4;
<span style="color:Blue; this.label1.Tag = <span style="color:#A31515; "";
<span style="color:Blue; this.label1.Text = <span style="color:#A31515; "Processing Images Please Wait ";
<span style="color:Green; //
<span style="color:Green; // textBox3
<span style="color:Green; //
<span style="color:Blue; this.textBox3.Location = <span style="color:Blue; new System.Drawing.Point(13, 578);
<span style="color:Blue; this.textBox3.Name = <span style="color:#A31515; "textBox3";
<span style="color:Blue; this.textBox3.Size = <span style="color:Blue; new System.Drawing.Size(261, 20);
<span style="color:Blue; this.textBox3.TabIndex = 20;
<span style="color:Green; //
<span style="color:Green; // textBox2
<span style="color:Green; //
<span style="color:Blue; this.textBox2.Location = <span style="color:Blue; new System.Drawing.Point(13, 552);
<span style="color:Blue; this.textBox2.Name = <span style="color:#A31515; "textBox2";
<span style="color:Blue; this.textBox2.Size = <span style="color:Blue; new System.Drawing.Size(261, 20);
<span style="color:Blue; this.textBox2.TabIndex = 19;
<span style="color:Green; //
<span style="color:Green; // textBox1
<span style="color:Green; //
<span style="color:Blue; this.textBox1.Location = <span style="color:Blue; new System.Drawing.Point(13, 526);
<span style="color:Blue; this.textBox1.Name = <span style="color:#A31515; "textBox1";
<span style="color:Blue; this.textBox1.Size = <span style="color:Blue; new System.Drawing.Size(261, 20);
<span style="color:Blue; this.textBox1.TabIndex = 18;
<span style="color:Green; //
<span style="color:Green; // trackBar2
<span style="color:Green; //
<span style="color:Blue; this.trackBar2.Location = <span style="color:Blue; new System.Drawing.Point(84, 3);
<span style="color:Blue; this.trackBar2.Name = <span style="color:#A31515; "trackBar2";
<span style="color:Blue; this.trackBar2.Orientation = System.Windows.Forms.Orientation.Vertical;
<span style="color:Blue; this.trackBar2.Size = <span style="color:Blue; new System.Drawing.Size(45, 517);
<span style="color:Blue; this.trackBar2.TabIndex = 5;
<span style="color:Blue; this.trackBar2.Scroll += <span style="color:Blue; new System.EventHandler(<span style="color:Blue; this.trackBar2_Scroll);
<span style="color:Blue; this.trackBar2.Enter += <span style="color:Blue; new System.EventHandler(<span style="color:Blue; this.trackBar2_Enter);
<span style="color:Blue; this.trackBar2.MouseMove += <span style="color:Blue; new System.Windows.Forms.MouseEventHandler(<span style="color:Blue; this.trackBar2_MouseMove);
<span style="color:Green; //
<span style="color:Green; // timer1
<span style="color:Green; //
<span style="color:Blue; this.timer1.Enabled = <span style="color:Blue; true;
<span style="color:Blue; this.timer1.Interval = 1000;
<span style="color:Blue; this.timer1.Tick += <span style="color:Blue; new System.EventHandler(<span style="color:Blue; this.timer1_Tick);
<span style="color:Green; //
<span style="color:Green; // timer2
<span style="color:Green; //
<span style="color:Blue; this.timer2.Enabled = <span style="color:Blue; true;
<span style="color:Blue; this.timer2.Interval = 50;
<span style="color:Blue; this.timer2.Tick += <span style="color:Blue; new System.EventHandler(<span style="color:Blue; this.timer2_Tick);
<span style="color:Green; //
<span style="color:Green; // timer3
<span style="color:Green; //
<span style="color:Blue; this.timer3.Interval = 3000;
<span style="color:Blue; this.timer3.Tick += <span style="color:Blue; new System.EventHandler(<span style="color:Blue; this.timer3_Tick);
<span style="color:Green; //
<span style="color:Green; // Picturebox1_Fullscreen
<span style="color:Green; //
<span style="color:Blue; this.AutoScaleDimensions = <span style="color:Blue; new System.Drawing.SizeF(6F, 13F);
<span style="color:Blue; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
<span style="color:Blue; this.ClientSize = <span style="color:Blue; new System.Drawing.Size(1625, 634);
<span style="color:Blue; this.Controls.Add(<span style="color:Blue; this.splitContainer1);
<span style="color:Blue; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
<span style="color:Blue; this.Name = <span style="color:#A31515; "Picturebox1_Fullscreen";
<span style="color:Blue; this.Text = <span style="color:#A31515; "Picturebox1_Fullscreen";
<span style="color:Blue; this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
<span style="color:Blue; this.FormClosing += <span style="color:Blue; new System.Windows.Forms.FormClosingEventHandler(<span style="color:Blue; this.Picturebox1_Fullscreen_FormClosing);
<span style="color:Blue; this.Load += <span style="color:Blue; new System.EventHandler(<span style="color:Blue; this.Picturebox1_Fullscreen_Load);
<span style="color:Blue; this.splitContainer1.Panel1.ResumeLayout(<span style="color:Blue; false);
<span style="color:Blue; this.splitContainer1.Panel2.ResumeLayout(<span style="color:Blue; false);
<span style="color:Blue; this.splitContainer1.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(<span style="color:Blue; this.splitContainer1)).EndInit();
<span style="color:Blue; this.splitContainer1.ResumeLayout(<span style="color:Blue; false);
<span style="color:Blue; this.splitContainer2.Panel1.ResumeLayout(<span style="color:Blue; false);
<span style="color:Blue; this.splitContainer2.Panel2.ResumeLayout(<span style="color:Blue; false);
<span style="color:Blue; this.splitContainer2.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(<span style="color:Blue; this.splitContainer2)).EndInit();
<span style="color:Blue; this.splitContainer2.ResumeLayout(<span style="color:Blue; false);
((System.ComponentModel.ISupportInitialize)(<span style="color:Blue; this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(<span style="color:Blue; this.trackBar1)).EndInit();
((System.ComponentModel.ISupportInitialize)(<span style="color:Blue; this.trackBar2)).EndInit();
<span style="color:Blue; this.ResumeLayout(<span style="color:Blue; false);

}

<span style="color:Blue; #endregion

<span style="color:Blue; private System.Windows.Forms.SplitContainer splitContainer1;
<span style="color:Blue; private System.Windows.Forms.TrackBar trackBar1;
<span style="color:Blue; private System.Windows.Forms.PictureBox pictureBox1;
<span style="color:Blue; private System.Windows.Forms.Label label1;
<span style="color:Blue; private System.Windows.Forms.Timer timer1;
<span style="color:Blue; private System.Windows.Forms.Label label3;
<span style="color:Blue; private System.Windows.Forms.Label label2;
<span style="color:Blue; private System.Windows.Forms.SplitContainer splitContainer2;
<span style="color:Blue; private System.Windows.Forms.TrackBar trackBar2;
<span style="color:Blue; private System.Windows.Forms.TextBox textBox1;
<span style="color:Blue; private System.Windows.Forms.TextBox textBox2;
<span style="color:Blue; private System.Windows.Forms.TextBox textBox3;
<span style="color:Blue; private System.Windows.Forms.Timer timer2;
<span style="color:Blue; public System.Windows.Forms.Timer timer3;
}
}

[/code]

I cant figure out how to disable this thing so the user wont be able to change the size between the two splitters while the program is running.
Tried both splitters fixed to single tried locked them nothing.
<hr class="sig danieli

View the full article
 
Back
Top