parent and child form in vb.net windows application

tutu

Member
Joined
Apr 17, 2006
Messages
12
Location
india
Programming Experience
1-3
hi all,
1)i want to know how to creat parent and child forms in my vb.net windows application so that i can pass values between the parent and the child form and vice a versa.
2)i would be greatful if you can tell me how to pass values between sibling forms in vb.net windows application,you are welcome to suggest me any link where i will be able to get information on these topics.
 
Create Mdi Form

First you have to create MDI Form. You can do this by Dragging MAINMENU from the toolbox. Set IsMdiContainer property to True. Now you type the name of the menu items. In the solution explorer right click on the project,go to add item. The item now you create is another Windows form. You can have a link with the parent form by writing the code in the click event of Menu items. Look at the example below

Protected Sub MDIChildNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click
Dim NewMDIChild As New Form2()
'Set the Parent Form of the Child window.
NewMDIChild.MdiParent = Me
'Display the new form.
NewMDIChild.Show()
End Sub


For more details check the following links
www.startvbdotnet.com/forms/mdi.aspx
msdn.microsoft.com/vbasic/ -http://msdn.microsoft.com/vbasic/previous/2003/using/default.aspx
www.programmingtutorials.com/vbnet.aspx




 
I suggest that you follow the first link in my signature and read all four parts of the tutorial. It will explain many different aspects of using multiple forms in VB.NET.
 
Back
Top