我本来就设置ControlBox = false,可是一设置,那三个按钮都没了啊
我还要最小化按钮
追答this.MaximizeBox = false;
this.MinimizeBox = true;
this.ControlBox = true;
然后在Form1的关闭事件中写入以下代码:(窗体的FormClosing)
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
e.Cancel = true;//拒绝关闭
}
此方法,行得通,并且简单,很好
可是,最大化和关闭按钮,还在。我想要那种,没有最大化和关闭按钮,只有最小化按钮的
本回答被提问者采纳自己做窗标题栏
首先
[DllImport("User32.dll", EntryPoint = "ReleaseCapture")]