hey guys,
I have this simple set a codes that opens a form as a child in MDI container.
Private Sub BarButtonItem1_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick
frmConfirmShipment.MdiParent = Me
frmConfirmShipment.Show()
''Dim NewMDIChild As New frmConfirmShipment() With {.MdiParent = Me}
''For Each ChildForm As Form In Me.MdiChildren
''If ChildForm.Name = NewMDIChild.Name Then
''ChildForm.Focus()
''Exit Sub
''End If
''Next
''NewMDIChild.Show()
End Sub
When i run this set of codes, system keep telling me that same form cannot be both mdichild and mdiparent, however, I never set my child form as a parent.
Someone please help~!