Vb net handling menustrip click event5/16/2023 Private Sub FeedbackFormToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles FeedbackFormToolStripMenuItem.Clickįm2.MdiParent = Me 'define the parent of form3, where Me represents the same form PictureBox1.Image = Image.FromFile("C:\Users\AMIT YADAV\Desktop\jtp2.png") IsMdiContainer = True 'Set the Boolean value to true to create the form as an MDI form. Private Sub MDI_Form_Load(sender As Object, e As EventArgs) Handles MyBase.Load Here, we have created the first Child Form with the name Form2. Step 3: In the third step, we will create two Forms: The Child Form of the Main Form or Parent Form. In the above image, we have defined two Subitems, First is the Feedback Form, and the Second is VB.NET. Step 2: After creating the Menu, add the Subitems into the Menu bar, as shown below. Step 1: First, we have to open the Windows form and create the Menu bar with the use of MenuStrip control, as shown below. Let's create a program to display the multiple windows in the VB.NET Windows Forms. Controls: It is used to get the reference of control from the child form.LayoutMdi(): The LayoutMdi() method is used to arrange the child forms in the parent or main form.IsMdiContainer: The IsMdiContainer property set a Boolean value to True that represents the creation of a form as an MDI form.ActiveMdiChild: The ActiveMdiChild property is used to get the reference of the current child form. MidParent: The MidParent property is used to set a parent form to a child form.VB.NET has folowing rules for creating a form as an MDI form. A parent form is a container that contains child forms, while child forms can be multiple to display different modules in a parent form. The MDI applications act as the parent and child relationship in a form. Whereas, a Single Document Interface (SDI) application can manipulate only one document at a time. MDI stands for Multiple Document Interface applications that allow users to work with multiple documents by opening more than one document at a time.
0 Comments
Leave a Reply. |