Mdi Child and paret form problem vb.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sep410
    New Member
    • Jul 2008
    • 77

    Mdi Child and paret form problem vb.net

    Please help me I am so confused.
    I am working on an application and I need to make one of my forms as a parent and the rest of them should be child.
    I tried this :
    Code:
    Private Sub ViewTransactionToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ViewTransactionToolStripMenuItem.Click
            Dim NewMDIChild As New frmTransaction
            NewMDIChild.MdiParent = Me
    
            frmTransaction.Show()
    
        End Sub
    And I set the IsMDIContainer property to true but it is not child and parent yet.

    What is wrong here?Do I have to change anything else too?
  • Curtis Rutland
    Recognized Expert Specialist
    • Apr 2008
    • 3264

    #2
    So your main form's IsMdiContainer property is set to true? That should be right.

    Comment

    • Sep410
      New Member
      • Jul 2008
      • 77

      #3
      Yes IsMDIContainer property is true. But it is not working.

      Comment

      • Sep410
        New Member
        • Jul 2008
        • 77

        #4
        Let me clear some facts for myself, Please correct me if I am wrong.
        When we have Child and parent forms the only parent’s name will be shown in the taskbar? Is it correct? And I should not be able to move child from out of parent form is true?

        Comment

        • Sep410
          New Member
          • Jul 2008
          • 77

          #5
          I found this and it helped me:
          With frmClose
          .MdiParent = Me
          .FormBorderStyl e = Windows.Forms.F ormBorderStyle. FixedDialog
          .Show()
          End With

          Comment

          Working...