ich habe ein kleines Windows Forms Projekt, in dem sich eine PictureBox befindet. Ich habe ihr eine größe von 600x600 gegeben, was im Designer auch so umgesetzt wird.
this.pic_Box.Size = new System.Drawing.Size(600, 600);
Diese Größe wird aus meinerseits nicht ersichtlichen Gründen in der Methode "ResumeLayout" verändert.
Gesamte Methode "InitializeComponent":
private void InitializeComponent()
{
this.gb_Settings = new System.Windows.Forms.GroupBox();
this.pic_Box = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.pic_Box)).BeginInit();
this.SuspendLayout();
//
// gb_Settings
//
this.gb_Settings.Location = new System.Drawing.Point(13, 13);
this.gb_Settings.Name = "gb_Settings";
this.gb_Settings.Size = new System.Drawing.Size(200, 600);
this.gb_Settings.TabIndex = 0;
this.gb_Settings.TabStop = false;
this.gb_Settings.Text = "Settings";
//
// pic_Box
//
this.pic_Box.Location = new System.Drawing.Point(220, 13);
this.pic_Box.Name = "pic_Box";
this.pic_Box.Size = new System.Drawing.Size(600, 600);
this.pic_Box.TabIndex = 1;
this.pic_Box.TabStop = false;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(833, 622);
this.Controls.Add(this.pic_Box);
this.Controls.Add(this.gb_Settings);
this.Name = "Form1";
this.Text = "RRR Robot Simulation";
this.Load += new System.EventHandler(this.Form1_Load);
((System.ComponentModel.ISupportInitialize)(this.pic_Box)).EndInit();
this.ResumeLayout(false);
}
Wie kann ich das unterbinden? Ich möchte die PictureBox einfach mit 600x600!
Danke im vorraus