VB.NET MDI FormMDI stands for Multiple Document Interface applications that allow users to work with multiple documents by opening more than one document at a time. Whereas, a Single Document Interface (SDI) application can manipulate only one document at a time. The MDI applications act as the parent and child relationship in a 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. VB.NET has folowing rules for creating a form as an MDI form.
Let's create a program to display the multiple windows in the VB.NET Windows Forms. Step 1: First, we have to open the Windows form and create the Menu bar with the use of MenuStrip control, as shown below. Step 2: After creating the Menu, add the Subitems into the Menu bar, as shown below. In the above image, we have defined two Subitems, First is the Feedback Form, and the Second is VB.NET. Step 3: In the third step, we will create two Forms: The Child Form of the Main Form or Parent Form. Here, we have created the first Child Form with the name Form2. Form2.vb Another Child Form with the name Form3. Form3.vb Step 4: Now we write the programming code for the Main or Parent Form, and here is the code for our Main Form. MDI_form.vb Output: After that, click on the Menu button, it shows two sub-items of the Menu as Feedback Form and VB.NET. We have clicked on the Feedback Form that displays the following form on the window. When we click on the Menu item, it shows the following image on the screen.
Next TopicVB.NET Dialog Box
|