gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 06:31:00 27 4
gpt4 key购买 nike

我知道 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/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com