MDI child problem

  • Thread starter Thread starter creamy
  • Start date Start date
C

creamy

Hello, everyone. I'm kinda new to VB.NET and i haven't used an MDI
container before. I create a form and want to call it on load of the
MDI container. i do this:

dim childObj as new CreatedForm()
childObj.MdiParent = Me
childObj.show()

it doesn't show the created form at all. Please i need help 'cos it is
baffling how it doesn't display as a child.
Thanks for your anticipated response.
 
Hello, everyone. I'm kinda new to VB.NET and i haven't used an MDI
container before. I create a form and want to call it on load of the
MDI container. i do this:

dim childObj as new CreatedForm()
childObj.MdiParent = Me
childObj.show()

it doesn't show the created form at all. Please i need help 'cos it is
baffling how it doesn't display as a child.
Thanks for your anticipated response.

Make sure you set the parent forms IsMDIContainer property to TRUE.
You may also want to take the object ref out of the load method so you
can access it later.

Dim childForm as CreatedForm()

Private Sub Main_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Load
childForm = new CreatedForm
childForm.MdiParent = Me
childForm.Show()
End Sub
 
Back
Top