.NET hide titlebar but keep border

前端 未结 3 1180
深忆病人
深忆病人 2021-01-02 18:37

I was wondering how to hide the titlebar of a form but keep the original border, like e.g Dropbox does:

Thanks in advance!

3条回答
  •  自闭症患者
    2021-01-02 19:05

    Here is a simple way:

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

    If the Form is designed to be a pop-up dialog, you might want to add the following line:

    this.ShowInTaskBar = false;
    

    That keeps the Form from appearing in the taskbar.

提交回复
热议问题