C# 启用调整Windows窗体大小
如何通过单击窗体的边框来调整窗体的大小?我甚至将C# 启用调整Windows窗体大小,c#,winforms,resize,C#,Winforms,Resize,如何通过单击窗体的边框来调整窗体的大小?我甚至将FormBorderStyle设置为sizeable。我错过了什么 以下是表单的属性: Designer.cs表单部分: // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.Auto
FormBorderStyle
设置为sizeable
。我错过了什么
以下是表单的属性:
Designer.cs表单部分:
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.ClientSize = new System.Drawing.Size(750, 378);
this.Controls.Add(this.rtxt_inactiveprograms);
this.Controls.Add(this.lbl_time);
this.Controls.Add(this.lsv_runningapps);
this.Controls.Add(this.btn_start);
this.Controls.Add(this.label3);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.lst_runningprocess);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.txt_pcname);
this.Controls.Add(this.btn_ping);
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);
this.PerformLayout();
这里的大小调整问题是,您只需将
AutoSizeMode
从growtandshrink
更改为growtonly
但是在这里调整大小不会影响表单的内容,也不会调整分辨率。@grantwiney好的,我会更新它。等等。检查您给form1.MaximizeBox和form1.MinimizeBox的值。这些值应设置为false。@Dnyanesh By false意思
0,0
right?@GrantWiney我在form1上的加载this.Location=新点(0,0)
和this.Size=Screen.PrimaryScreen.WorkingArea.Size代码>。我应该把它拿走吗?@GrantWinney甚至右下角都不行。哦,顺便说一下,如果这与什么有关的话,我正在使用XP
和VS2010
。