如何通过点击边框来调整表单大小?我甚至将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();
答案 0 :(得分:3)
此处调整问题的大小只需要将AutoSizeMode
从GrowAndShrink
更改为GrowOnly
。但是,在此处调整大小不会影响表单的内容,也不会根据您的分辨率进行调整