gpt4 book ai didi

c# - 如何删除Windows窗体应用程序中的标题栏

转载 作者:太空宇宙 更新时间:2023-11-03 10:52:04 34 4
gpt4 key购买 nike

IDE:Visual Studio 2010 c# .net,Windows 窗体应用程序

你好,我正在尝试删除 Windows 窗体应用程序中的标题栏,但我做不到。 (图片在这里):

标题栏:

http://i772.photobucket.com/albums/yy9/yogeshkmrsoni/titlebarProblem_zps57e6a986.jpg

为了删除它,我试过这段代码:

this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;

但它仍然显示如图所示的边框。

最佳答案

尝试将 Forms ControlBox 属性设置为 false 并将 Text 属性设置为空字符串 ("")。

这是一个片段:

this.ControlBox = false;
this.Text = String.Empty;

您可以通过这种方式重试将 FormBorderStyle 设置为 none enter image description here

关于c# - 如何删除Windows窗体应用程序中的标题栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21084807/

34 4 0