MDI child problem

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.
 
C

Charlie Brown

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top