Small applications might well reside within a single window, but as applications become larger and more robust, you may find it necessary to create a Multiple-Document Interface (MDI) application capable of opening several windows at once. The main application window of an MDI application is referred to as the parent window , which is able to open several child windows. The Windows forms in an MDI application are created using the System.Windows.Forms.Form class. You need to know the following main points about an MDI application:
To create an MDI parent form, create a Windows form and change its IsMdiContainer property to True. To create an MDI child form, create a Windows form and assign the name of the MDI parent form to its MdiParent property. You can only set the MdiParent property in code, not from the Properties window. Normally, you'll do this in code, after creating a new child form. For example, this code snippet creates a child of the current form: Dim f As frmChild = New frmChild() f.MdiParent = Me Table 2.28 summarizes the important members of the Form class related to the MDI forms. Table 2.28. Important Members of the Form Class Related to MDI Applications
|