MDI子表单显示在Parent的控件后面

时间:2013-10-21 03:33:47

标签: vb.net winforms

我的父窗体有一些控件,MDI子窗体应该弹出父窗体的底部。这一切都按计划进行,但问题是我的子表单不断出现在父表单的控件之后。在TopMost上将父表单发送为false,将子表单发送为True,我也尝试将子表单放到前面,但没有。

儿童形态也是无底的,我甚至试图将边界放回去,看看是否有所作为,但事实并非如此。这是我调用子表单的代码。

Private Sub ToggleButton(strButtonName As String, strReportTitle As String, strButtonDescription As String, objButton As Object, boolView As Boolean, boolStatus As Boolean)

Dim btnDescription As New frmButtonDescription(Me)

        If Not m_cToggleFlags.ContainsKey(strButtonName) Then
            m_cToggleFlags.Add(strButtonName, False)
        End If

        If m_cToggleFlags(strButtonName) Then

            btnDescription.Hide()
        Else

            btnDescription.lblReportTitle.Text = strReportTitle
            btnDescription.lblReportDescription.Text = strButtonDescription
            btnDescription.MdiParent = Me

            btnDescription.Show()
            btnDescription.BringToFront()
            btnDescription.btnOpenReport.Visible = boolView
            btnDescription.btnOpenDashboard.Visible = boolStatus


        End If

        m_cToggleFlags(strButtonName) = Not m_cToggleFlags(strButtonName)

    End Sub

0 个答案:

没有答案