如何通过单击边框来调整表单大小?我什至将 FormBorderStyle
设置为 sizable
。我错过了什么?
表单的属性如下:
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
从 GrowAndShrink
更改为 GrowOnly
。
但在这里调整大小不会影响表单的内容,也不会为您调整分辨率。
关于c# - 启用调整 Windows Forms 窗体的大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25130120/