Presentation is loading. Please wait.

Presentation is loading. Please wait.

MDI vs. SDI MDI – Multiple Document Interface SDI – Single Document Interface In an SDI application, each form acts independently of the others. A MDI.

Similar presentations


Presentation on theme: "MDI vs. SDI MDI – Multiple Document Interface SDI – Single Document Interface In an SDI application, each form acts independently of the others. A MDI."— Presentation transcript:

1 MDI vs. SDI MDI – Multiple Document Interface SDI – Single Document Interface In an SDI application, each form acts independently of the others. A MDI project resembles applications such as Word and Excel which have a parent window and child windows. When you unload the parent form, all the child forms are unloaded. All the child forms display within the boundaries of the parent form.

2 MDI Projects A VB project can only have one MDI form which is the parent. You can make other forms into child forms by setting the MDIChild property to True. In an MDI project, you should make all nonparent forms into child forms, with the exception of the splash screen.

3 Creating an MDI Project 1.Add an MDI Form to the project by choosing Project/Add MDI Form.

4 Creating an MDI Project 2.Add other forms and set MDIChild Property to True. 3.Set up Menus. 4.Write code to load forms as needed. 5.Make Windows Menu.

5 Menus in MDI Project Key Idea: If the parent form has a menu, its menu displays only if no child form with a menu is displaying. If any child form has a menu, its menu replaces the parent form’s menu. (Just like in Excel and Word).

6 The Windows Menu You can create a Windows menu – so your project will behave like other Windows applications. Includes options for Cascade, Tile Horizontally, Tile Vertically and a list of the Windows. To include the list of Windows, check the Window List option for the Menu Name

7 The Forms Collection The Forms Collection consists of all the forms in a project that are loaded into memory. The collection may contain MDI forms, MDI child forms, and Regular Forms. You can refer to each form by using the index. Example: Forms(0), Forms(1), Forms(2) The Forms collection has a Count Property.


Download ppt "MDI vs. SDI MDI – Multiple Document Interface SDI – Single Document Interface In an SDI application, each form acts independently of the others. A MDI."

Similar presentations


Ads by Google