My parent form has a few controls, the MDI child form is supposed to pop up at the bottom of the parent form. This all works as planned, but the issue is that my child form keeps popping up behind the controls of the parent form. The parent form is sent to false on TopMost and the child to True, I also tried bringing the child form to the front but nothing.
The child form is also boderless, I even try to put the borders back and see if that made a difference but it did not. here is my code to call the child form.
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