简体   繁体   English

如何在vb.net中删除子窗体的标题栏

[英]how to remove the title bar of a child form in vb.net

I am creating a MdiParent form in vb.net. 我正在vb.net中创建一个MdiParent表单。
For that I have created the child form. 为此,我创建了子窗体。
The child form's FormBorderStyle is none. 子窗体的FormBorderStyle为none。
But while I open it on the MdiParent form, it shows the title bar at the bottom of the MdiParent form. 但是,当我在MdiParent窗体上打开它时,它在MdiParent窗体的底部显示了标题栏。
How can I remove it? 如何删除?

I don't think you are setting the MdiParent. 我认为您没有设置MdiParent。 here is some sample code that works for me: 这是一些对我有用的示例代码:

Private Sub frmParent_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Me.IsMdiContainer = True

    frmChild.FormBorderStyle = Windows.Forms.FormBorderStyle.None
    frmChild.MdiParent = Me
    frmChild.Show()
End Sub

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM