hi, ive been trying to get statusstrips merging so i can click a label to bring the child form to the front when i have multiple childforms open. I have this code which does work but on closing it leaves the label on the mdiparent and also im struggling with the bring back to front code. i dont want it to open another form just bring it back to front. I have statusstrip set to visible false on my childform. heres some code for merging, this is in mdi parent:-
Private Sub Form1ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Form1ToolStripMenuItem.Click
Dim NewMDIChild As New Form1
NewMDIChild.MdiParent = Me
NewMDIChild.WindowState = FormWindowState.Maximized
NewMDIChild.Show()
Dim activeform As Form1 = Me.ActiveMdiChild
If Not (Me.ActiveMdiChild Is Nothing) Then
If Me.ActiveMdiChild.Name = Form1.Name Then
ToolStripManager.Merge(Form1.StatusStrip1, Me.StatusStrip1)
End If
End If
End Sub
and some for bring back to front, this is in form1:-
Private Sub ToolStripStatusLabel1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripStatusLabel1.Click
Dim MDIChild As New Form1
MDIChild.BringToFront()
End Sub
thanks
Private Sub Form1ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Form1ToolStripMenuItem.Click
Dim NewMDIChild As New Form1
NewMDIChild.MdiParent = Me
NewMDIChild.WindowState = FormWindowState.Maximized
NewMDIChild.Show()
Dim activeform As Form1 = Me.ActiveMdiChild
If Not (Me.ActiveMdiChild Is Nothing) Then
If Me.ActiveMdiChild.Name = Form1.Name Then
ToolStripManager.Merge(Form1.StatusStrip1, Me.StatusStrip1)
End If
End If
End Sub
and some for bring back to front, this is in form1:-
Private Sub ToolStripStatusLabel1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripStatusLabel1.Click
Dim MDIChild As New Form1
MDIChild.BringToFront()
End Sub
thanks