Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我通过以下方式全屏显示:FormBorderStyle = FormBorderStyle.None; 但是没有最大/最小/关闭按钮?如何得到它?
如果希望全屏窗体保留控件,请将窗体的 WindowState 属性设置为最大化,而不是删除窗体边框。
private void Form1_Shown(object sender, EventArgs e) { this.WindowState = System.Windows.Forms.FormWindowState.Maximized; }
如果您确实想要一个没有边框的全屏表单,那么最好的方法可能是自定义用户控件来模拟标准的最小/最大/关闭功能。