我如何从MDI父母的标题栏中删除最大化的MDI子女的名字?

问题描述 投票:0回答:1

我正在使用Visual BasicWindows Forms中进行MDI应用。当Windows Forms中的MDI子级最大化时,该子级的标题名称将显示在MDI父级的标题栏中。我不喜欢这种格式设置的方式,我想禁止在MDI父标题中显示文本。这是它的样子:

A windows form with an MDI Child maximized showing the child's title name in the parent's title bar.

我已经尝试过更改表单的Text属性,只要它的末尾有']'(例如,当MDI Child最大化时)]]] >>

    Private Sub WorkHost_TextChanged(sender As Object, e As EventArgs) Handles MyBase.TextChanged
        If Me.Text.EndsWith("]") Then
            Me.Text = "Atlas Departure Control"
        End If
    End Sub

这没有任何作用,因为MDI子项的名称实际上没有显示在表单的Text属性中。

我还尝试过使用单个按钮来更改文本((在最大化表单时出现任何计时问题)

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Me.Text = "Atlas Departure Control"
    End Sub

我在这里完全迷失了,我将不胜感激。

谢谢!

我正在使用Windows窗体在Visual Basic中制作MDI应用程序。当Windows窗体中的MDI子级最大化时,该子级的标题名称将显示在MDI父级的标题栏中。我不喜欢...

vb.net winforms mdi mdichild mdiparent
1个回答
1
投票

您可以将子表格的Text设置为string.Empty。当最大化时,这将删除在主标题中显示的儿童标题。

childForm.Text = String.Empty
© www.soinside.com 2019 - 2024. All rights reserved.