我知道 P/invoke 可以,但是有管理的方法吗?
最佳答案
您应该能够切换 ControlBox
属性。
public void CreateMyBorderlessWindow()
{
this.FormBorderStyle = FormBorderStyle.None;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.StartPosition = FormStartPosition.CenterScreen;
// Remove the control box so the form will only display client area.
this.ControlBox = false;
}
关于winforms - 如何在 C# 中创建没有最大/最小/关闭按钮的表单?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1845836/