I have a designer code of a form and whne in runtime i add a button in the mose right edge side when

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
The problem is when im making a double click on the mouse the new form is openning in a fullscreen mode means the new form is in Full Screen.
The question is how can i make that the designer will be in the same proportion as it looks when running the program ?

This is the code of the designer of the form wich is Show in full screen:

<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.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.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();
<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.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; // button2
<span style="color:Green; //
<span style="color:Blue; this.button2.Location = <span style="color:Blue; new System.Drawing.Point(890, 4);
<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(103, 23);
<span style="color:Blue; this.button2.TabIndex = 11;
<span style="color:Blue; this.button2.Text = <span style="color:#A31515; "Save Animated Gif";
<span style="color:Blue; this.button2.UseVisualStyleBackColor = <span style="color:Blue; true;
<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.AutoSize = <span style="color:Blue; true;
<span style="color:Blue; this.label2.Location = <span style="color:Blue; new System.Drawing.Point(3, 9);
<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 = 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.AutoSize = <span style="color:Blue; true;
<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(676, 8);
<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(150, 17);
<span style="color:Blue; this.checkBox1.TabIndex = 9;
<span style="color:Blue; this.checkBox1.Text = <span style="color:#A31515; "Create 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.AutoSize = <span style="color:Blue; true;
<span style="color:Blue; this.label3.Location = <span style="color:Blue; new System.Drawing.Point(300, 9);
<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 = 7;
<span style="color:Blue; this.label3.Text = <span style="color:#A31515; "label3";
<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);
<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;

}
}
[/code]
<hr class="sig danieli

View the full article
 
Back
Top