Click to See Complete Forum and Search --> : showing a mdiChild form


Jym
October 12th, 2002, 01:52 PM
OK I am lost in my attempt to upgrade to .NET

In visual basic 6.0 I would type

form2.show

and when I would run the app. it would show form1 as my mdi form and open form2 as the child form ... now I don't have a clue what to do to get form2 to appear on the screen as a child form of form1.

Hopefully this is a simple upgrade for me to learn :)

Thanks to anyone taking the time to help out.

Jym (day one of learning Visual Basic .NET)

DSJ
October 14th, 2002, 08:50 AM
Go here and search for MDI:

http://msdn.microsoft.com/vbasic/techinfo/articles/upgrade/guide.asp

vszilard
October 14th, 2002, 09:59 AM
form1.IsMdiContainer= true;

Form2Class newfrm2 = Form2Class.CreateInstance(parameters..);
newfrm2.MdiParent = this;
newfrm2.Show();

//where Form2Class - is the form 2 class name

//and this call is made from form1 body

WillemM
October 21st, 2002, 11:40 AM
I guess you need this one for VB.NET:


public sub mySub()

dim frm as new Form2

frm.mdiParent = me
frm.Show()

end sub