如何在C#中创建一个没有最大化/最小化/关闭按钮的表单?

4
我知道P/invoke可以实现,但是否有托管方式?
2个回答

阿里云服务器只需要99元/年,新老用户同享,点击查看详情
10
你应该能够切换 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;
 }

1

是的...只需在表单属性中禁用控制框。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,