In my project all, my forms are accessed through my MDI form,

Private Sub DocumentCollectionToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DocumentCollectionToolStripMenuItem.Click

        Dim capture1 As Boolean = False

        capture1 = noduplicatemdi("DOCUMENT_COLLECTION")

        If capture1 = False Then


            Dim mdiForm As New DOCUMENT_COLLECTION

            mdiForm.MdiParent = Me
            mdiForm.Show()


        End If


    End Sub

now, within one of my forms, i access a second form.

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Dim mastersupplier As MS
        mastersupplier = New MS
        mastersupplier.Show()
        Me.Hide()
  

    End Sub

but once i click save on the MDI parent it doesn't recognize the second form as a child unless i open it from the mdi form itself.Is there any way to fix this?

Recommended Answers

All 2 Replies

Try setting the mdiparent of that second form to the MDI form.

mastersupplier.MdiParent = <name of mdi form>

Thanx a lot!! I was wondering if any1 wud answer!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.