MDI parent form and child form

Hi, I m doing migration from VB6 to VB.net. The way to show form within MDI form as following:

In VB6

Call form1.show()

I can call child form within MDI form using the syntax above directly, whereas in VB.net it gives me AccessViolationException

Does anyone know how to solve this problem?

HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

[617 byte] By [BiBiMeiMei] at [2008-2-4]
# 1

YOu can show a mdi child as fallows

form1.MdiParent = <Mdi Parent Form>

form1.Show()

PrasantSwain at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic Interop and Upgrade...
# 2

Hi,

you probably just need to create a new instance of Form1. Put the following code on your MDI parent form:

Dim form As New Form1()
form.MdiParent =
Me
form.Show()

Andrej

AndrejTozon at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic Interop and Upgrade...