C# 有两种办法
1.代码中加 form1.FormBorderStyle = FormBorderStyle.None;//无边框
2.在窗本属性栏找FormBorderStyle选择none
c#
关闭FormBorderStyle
private void Form1_Load(object sender, EventArgs e) { this.FormBorderStyle = FormBorderStyle.None;//无边框 }
重新设置
private void Form1_Paint(object sender, PaintEventArgs e) { e.Graphics.DrawRectangle(Pens.DarkOliveGreen, 0, 0, this.Width - 1, this.Height - 1); }