I have two forms and i want to make the same designer with ojects on the second form like in the fir

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
This is the designer code of the first form:

<div style="color:Black;background-color:White; <pre>
<span style="color:Blue; namespace WindowsFormsApplication1
{
<span style="color:Blue; partial <span style="color:Blue; class Picturebox2_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.splitContainer1 = <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.splitContainer2 = <span style="color:Blue; new System.Windows.Forms.SplitContainer();
<span style="color:Blue; this.label5 = <span style="color:Blue; new System.Windows.Forms.Label();
<span style="color:Blue; this.label4 = <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.checkBox2 = <span style="color:Blue; new System.Windows.Forms.CheckBox();
<span style="color:Blue; this.numericUpDown1 = <span style="color:Blue; new System.Windows.Forms.NumericUpDown();
<span style="color:Blue; this.button2 = <span style="color:Blue; new System.Windows.Forms.Button();
<span style="color:Blue; this.label2 = <span style="color:Blue; new System.Windows.Forms.Label();
<span style="color:Blue; this.checkBox1 = <span style="color:Blue; new System.Windows.Forms.CheckBox();
<span style="color:Blue; this.label3 = <span style="color:Blue; new System.Windows.Forms.Label();
<span style="color:Blue; this.button1 = <span style="color:Blue; new System.Windows.Forms.Button();
<span style="color:Blue; this.myTrackPanelss1 = <span style="color:Blue; new WindowsFormsApplication1.MyTrackPanelss();
((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.pictureBox1)).BeginInit();
((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.numericUpDown1)).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.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
<span style="color:Blue; this.splitContainer1.IsSplitterFixed = <span style="color:Blue; true;
<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:Blue; this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
<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.pictureBox1);
<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.splitContainer2);
<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.Size = <span style="color:Blue; new System.Drawing.Size(1000, 524);
<span style="color:Blue; this.splitContainer1.SplitterDistance = 379;
<span style="color:Blue; this.splitContainer1.TabIndex = 0;
<span style="color:Blue; this.splitContainer1.DoubleClick += <span style="color:Blue; new System.EventHandler(<span style="color:Blue; this.splitContainer1_Panel1_DoubleClick);
<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(1000, 379);
<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; // 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.Controls.Add(<span style="color:Blue; this.button1);
<span style="color:Blue; this.splitContainer2.Panel1.Controls.Add(<span style="color:Blue; this.label5);
<span style="color:Blue; this.splitContainer2.Panel1.Controls.Add(<span style="color:Blue; this.label4);
<span style="color:Blue; this.splitContainer2.Panel1.Controls.Add(<span style="color:Blue; this.label1);
<span style="color:Blue; this.splitContainer2.Panel1.Controls.Add(<span style="color:Blue; this.checkBox2);
<span style="color:Blue; this.splitContainer2.Panel1.Controls.Add(<span style="color:Blue; this.numericUpDown1);
<span style="color:Blue; this.splitContainer2.Panel1.Controls.Add(<span style="color:Blue; this.button2);
<span style="color:Blue; this.splitContainer2.Panel1.Controls.Add(<span style="color:Blue; this.label2);
<span style="color:Blue; this.splitContainer2.Panel1.Controls.Add(<span style="color:Blue; this.checkBox1);
<span style="color:Blue; this.splitContainer2.Panel1.Controls.Add(<span style="color:Blue; this.label3);
<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.myTrackPanelss1);
<span style="color:Blue; this.splitContainer2.Size = <span style="color:Blue; new System.Drawing.Size(1000, 141);
<span style="color:Blue; this.splitContainer2.SplitterDistance = 40;
<span style="color:Blue; this.splitContainer2.TabIndex = 12;
<span style="color:Green; //
<span style="color:Green; // label5
<span style="color:Green; //
<span style="color:Blue; this.label5.AutoSize = <span style="color:Blue; true;
<span style="color:Blue; this.label5.Font = <span style="color:Blue; new System.Drawing.Font(<span style="color:#A31515; "Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((<span style="color:Blue; byte)(177)));
<span style="color:Blue; this.label5.ForeColor = System.Drawing.Color.Green;
<span style="color:Blue; this.label5.Location = <span style="color:Blue; new System.Drawing.Point(177, 12);
<span style="color:Blue; this.label5.Name = <span style="color:#A31515; "label5";
<span style="color:Blue; this.label5.Size = <span style="color:Blue; new System.Drawing.Size(46, 17);
<span style="color:Blue; this.label5.TabIndex = 16;
<span style="color:Blue; this.label5.Text = <span style="color:#A31515; "label5";
<span style="color:Green; //
<span style="color:Green; // label4
<span style="color:Green; //
<span style="color:Blue; this.label4.AutoSize = <span style="color:Blue; true;
<span style="color:Blue; this.label4.Font = <span style="color:Blue; new System.Drawing.Font(<span style="color:#A31515; "Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((<span style="color:Blue; byte)(177)));
<span style="color:Blue; this.label4.ForeColor = System.Drawing.Color.Green;
<span style="color:Blue; this.label4.Location = <span style="color:Blue; new System.Drawing.Point(336, 12);
<span style="color:Blue; this.label4.Name = <span style="color:#A31515; "label4";
<span style="color:Blue; this.label4.Size = <span style="color:Blue; new System.Drawing.Size(46, 17);
<span style="color:Blue; this.label4.TabIndex = 15;
<span style="color:Blue; this.label4.Text = <span style="color:#A31515; "label4";
<span style="color:Green; //
<span style="color:Green; // label1
<span style="color:Green; //
<span style="color:Blue; this.label1.Anchor = System.Windows.Forms.AnchorStyles.Right;
<span style="color:Blue; this.label1.AutoSize = <span style="color:Blue; true;
<span style="color:Blue; this.label1.Font = <span style="color:Blue; new System.Drawing.Font(<span style="color:#A31515; "Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((<span style="color:Blue; byte)(177)));
<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(625, 12);
<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(140, 17);
<span style="color:Blue; this.label1.TabIndex = 14;
<span style="color:Blue; this.label1.Text = <span style="color:#A31515; "Set Animation Speed";
<span style="color:Blue; this.label1.Visible = <span style="color:Blue; false;
<span style="color:Green; //
<span style="color:Green; // checkBox2
<span style="color:Green; //
<span style="color:Blue; this.checkBox2.Anchor = System.Windows.Forms.AnchorStyles.Right;
<span style="color:Blue; this.checkBox2.AutoSize = <span style="color:Blue; true;
<span style="color:Blue; this.checkBox2.Font = <span style="color:Blue; new System.Drawing.Font(<span style="color:#A31515; "Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((<span style="color:Blue; byte)(177)));
<span style="color:Blue; this.checkBox2.ForeColor = System.Drawing.Color.Red;
<span style="color:Blue; this.checkBox2.Location = <span style="color:Blue; new System.Drawing.Point(834, 11);
<span style="color:Blue; this.checkBox2.Name = <span style="color:#A31515; "checkBox2";
<span style="color:Blue; this.checkBox2.Size = <span style="color:Blue; new System.Drawing.Size(59, 21);
<span style="color:Blue; this.checkBox2.TabIndex = 13;
<span style="color:Blue; this.checkBox2.Text = <span style="color:#A31515; "Loop";
<span style="color:Blue; this.checkBox2.UseVisualStyleBackColor = <span style="color:Blue; true;
<span style="color:Blue; this.checkBox2.Visible = <span style="color:Blue; false;
<span style="color:Blue; this.checkBox2.CheckedChanged += <span style="color:Blue; new System.EventHandler(<span style="color:Blue; this.checkBox2_CheckedChanged);
<span style="color:Green; //
<span style="color:Green; // numericUpDown1
<span style="color:Green; //
<span style="color:Blue; this.numericUpDown1.Anchor = System.Windows.Forms.AnchorStyles.Right;
<span style="color:Blue; this.numericUpDown1.Location = <span style="color:Blue; new System.Drawing.Point(771, 12);
<span style="color:Blue; this.numericUpDown1.Name = <span style="color:#A31515; "numericUpDown1";
<span style="color:Blue; this.numericUpDown1.Size = <span style="color:Blue; new System.Drawing.Size(45, 20);
<span style="color:Blue; this.numericUpDown1.TabIndex = 12;
<span style="color:Blue; this.numericUpDown1.Visible = <span style="color:Blue; false;
<span style="color:Blue; this.numericUpDown1.ValueChanged += <span style="color:Blue; new System.EventHandler(<span style="color:Blue; this.numericUpDown1_ValueChanged);
<span style="color:Green; //
<span style="color:Green; // button2
<span style="color:Green; //
<span style="color:Blue; this.button2.Anchor = System.Windows.Forms.AnchorStyles.Right;
<span style="color:Blue; this.button2.Font = <span style="color:Blue; new System.Drawing.Font(<span style="color:#A31515; "Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((<span style="color:Blue; byte)(177)));
<span style="color:Blue; this.button2.ForeColor = System.Drawing.Color.Green;
<span style="color:Blue; this.button2.Location = <span style="color:Blue; new System.Drawing.Point(914, 9);
<span style="color:Blue; this.button2.Name = <span style="color:#A31515; "button2";
<span style="color:Blue; this.button2.Size = <span style="color:Blue; new System.Drawing.Size(83, 23);
<span style="color:Blue; this.button2.TabIndex = 11;
<span style="color:Blue; this.button2.Text = <span style="color:#A31515; "Create Gif";
<span style="color:Blue; this.button2.UseVisualStyleBackColor = <span style="color:Blue; true;
<span style="color:Blue; this.button2.Visible = <span style="color:Blue; false;
<span style="color:Blue; this.button2.Click += <span style="color:Blue; new System.EventHandler(<span style="color:Blue; this.button2_Click);
<span style="color:Green; //
<span style="color:Green; // label2
<span style="color:Green; //
<span style="color:Blue; this.label2.Anchor = System.Windows.Forms.AnchorStyles.Left;
<span style="color:Blue; this.label2.AutoSize = <span style="color:Blue; true;
<span style="color:Blue; this.label2.Font = <span style="color:Blue; new System.Drawing.Font(<span style="color:#A31515; "Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((<span style="color:Blue; byte)(177)));
<span style="color:Blue; this.label2.ForeColor = System.Drawing.Color.Red;
<span style="color:Blue; this.label2.Location = <span style="color:Blue; new System.Drawing.Point(3, 12);
<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(46, 17);
<span style="color:Blue; this.label2.TabIndex = 3;
<span style="color:Blue; this.label2.Text = <span style="color:#A31515; "label2";
<span style="color:Green; //
<span style="color:Green; // checkBox1
<span style="color:Green; //
<span style="color:Blue; this.checkBox1.Anchor = System.Windows.Forms.AnchorStyles.Right;
<span style="color:Blue; this.checkBox1.AutoSize = <span style="color:Blue; true;
<span style="color:Blue; this.checkBox1.Font = <span style="color:Blue; new System.Drawing.Font(<span style="color:#A31515; "Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((<span style="color:Blue; byte)(177)));
<span style="color:Blue; this.checkBox1.ForeColor = System.Drawing.Color.Red;
<span style="color:Blue; this.checkBox1.Location = <span style="color:Blue; new System.Drawing.Point(383, 11);
<span style="color:Blue; this.checkBox1.Name = <span style="color:#A31515; "checkBox1";
<span style="color:Blue; this.checkBox1.Size = <span style="color:Blue; new System.Drawing.Size(147, 21);
<span style="color:Blue; this.checkBox1.TabIndex = 9;
<span style="color:Blue; this.checkBox1.Text = <span style="color:#A31515; "Animated Gif Mode";
<span style="color:Blue; this.checkBox1.UseVisualStyleBackColor = <span style="color:Blue; true;
<span style="color:Blue; this.checkBox1.CheckedChanged += <span style="color:Blue; new System.EventHandler(<span style="color:Blue; this.checkBox1_CheckedChanged);
<span style="color:Green; //
<span style="color:Green; // label3
<span style="color:Green; //
<span style="color:Blue; this.label3.Anchor = System.Windows.Forms.AnchorStyles.Left;
<span style="color:Blue; this.label3.AutoSize = <span style="color:Blue; true;
<span style="color:Blue; this.label3.Font = <span style="color:Blue; new System.Drawing.Font(<span style="color:#A31515; "Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((<span style="color:Blue; byte)(177)));
<span style="color:Blue; this.label3.ForeColor = System.Drawing.Color.Red;
<span style="color:Blue; this.label3.Location = <span style="color:Blue; new System.Drawing.Point(248, 12);
<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(46, 17);
<span style="color:Blue; this.label3.TabIndex = 7;
<span style="color:Blue; this.label3.Text = <span style="color:#A31515; "label3";
<span style="color:Green; //
<span style="color:Green; // button1
<span style="color:Green; //
<span style="color:Blue; this.button1.Anchor = System.Windows.Forms.AnchorStyles.Right;
<span style="color:Blue; this.button1.Font = <span style="color:Blue; new System.Drawing.Font(<span style="color:#A31515; "Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((<span style="color:Blue; byte)(177)));
<span style="color:Blue; this.button1.ForeColor = System.Drawing.Color.Green;
<span style="color:Blue; this.button1.Location = <span style="color:Blue; new System.Drawing.Point(544, 9);
<span style="color:Blue; this.button1.Name = <span style="color:#A31515; "button1";
<span style="color:Blue; this.button1.Size = <span style="color:Blue; new System.Drawing.Size(75, 23);
<span style="color:Blue; this.button1.TabIndex = 17;
<span style="color:Blue; this.button1.Text = <span style="color:#A31515; "Preview";
<span style="color:Blue; this.button1.UseVisualStyleBackColor = <span style="color:Blue; true;
<span style="color:Blue; this.button1.Click += <span style="color:Blue; new System.EventHandler(<span style="color:Blue; this.button1_Click);
<span style="color:Green; //
<span style="color:Green; // myTrackPanelss1
<span style="color:Green; //
<span style="color:Blue; this.myTrackPanelss1.Dock = System.Windows.Forms.DockStyle.Top;
<span style="color:Blue; this.myTrackPanelss1.End = 10;
<span style="color:Blue; this.myTrackPanelss1.Location = <span style="color:Blue; new System.Drawing.Point(0, 0);
<span style="color:Blue; this.myTrackPanelss1.Name = <span style="color:#A31515; "myTrackPanelss1";
<span style="color:Blue; this.myTrackPanelss1.Size = <span style="color:Blue; new System.Drawing.Size(1000, 85);
<span style="color:Blue; this.myTrackPanelss1.Start = 0;
<span style="color:Blue; this.myTrackPanelss1.TabIndex = 8;
<span style="color:Green; //
<span style="color:Green; // Picturebox2_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(1000, 524);
<span style="color:Blue; this.Controls.Add(<span style="color:Blue; this.splitContainer1);
<span style="color:Blue; this.Name = <span style="color:#A31515; "Picturebox2_Fullscreen";
<span style="color:Blue; this.Text = <span style="color:#A31515; "Picturebox2_Fullscreen";
<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);
((System.ComponentModel.ISupportInitialize)(<span style="color:Blue; this.splitContainer1)).EndInit();
<span style="color:Blue; this.splitContainer1.ResumeLayout(<span style="color:Blue; false);
((System.ComponentModel.ISupportInitialize)(<span style="color:Blue; this.pictureBox1)).EndInit();
<span style="color:Blue; this.splitContainer2.Panel1.ResumeLayout(<span style="color:Blue; false);
<span style="color:Blue; this.splitContainer2.Panel1.PerformLayout();
<span style="color:Blue; this.splitContainer2.Panel2.ResumeLayout(<span style="color:Blue; false);
((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.numericUpDown1)).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.PictureBox pictureBox1;
<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 MyTrackPanelss myTrackPanelss1;
<span style="color:Blue; private System.Windows.Forms.CheckBox checkBox1;
<span style="color:Blue; private System.Windows.Forms.SplitContainer splitContainer2;
<span style="color:Blue; private System.Windows.Forms.Button button2;
<span style="color:Blue; private System.Windows.Forms.Label label1;
<span style="color:Blue; private System.Windows.Forms.CheckBox checkBox2;
<span style="color:Blue; private System.Windows.Forms.NumericUpDown numericUpDown1;
<span style="color:Blue; private System.Windows.Forms.Label label5;
<span style="color:Blue; private System.Windows.Forms.Label label4;
<span style="color:Blue; private System.Windows.Forms.Button button1;

}
}
[/code]



And this is the code of the designer of the second Form. On the second form i have splitted it to two left and right. I want to keep the right section as it is.
And i want to make the left section like in the first Form. I also want to make that the trackBar1 from left to right on the second form will be from the start of left side to the end of the right side. And the trackBar2 on the second form to be from
where it start now or from top to down untill the trackBar1.
But in general to keep the concept of the second Form splitted to two left and right left side should looks like the first Form.

This is the code of the second Form:

<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.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);
<span style="color:Blue; this.trackBar1 = <span style="color:Blue; new System.Windows.Forms.TrackBar();
((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.trackBar2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(<span style="color:Blue; this.trackBar1)).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; // 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; // 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; // 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.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.trackBar2)).EndInit();
((System.ComponentModel.ISupportInitialize)(<span style="color:Blue; this.trackBar1)).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.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;
<span style="color:Blue; private System.Windows.Forms.TrackBar trackBar1;
}
}

[/code]

In the first Form designer code im using: myTrackPanelss1 wich is a user control wich containing a panel1 and a trackbar1 and i need to use it also on the second Form. To put it in the designer of the second form wich im using there now only with trackBar1.
<hr class="sig danieli

View the full article
 
Back
Top