VB.NET Developer's Guide

Creating Multiple Document Interface Applications

MDI applications allow simultaneous display of multiple documents, with each document displayed in its own window. MDI applications consist of an MDI parent form and MDI child forms. An MDI application allows you to determine the child form that has the focus. Often MDI applications also allow the user to quickly switch between child windows and to tile, cascade, and arrange child windows. In the following sections, we discuss these topics in detail. First, let s look closely at how to create an MDI parent form.

Creating an MDI Parent Form

The MDI parent form is at the heart of an MDI application. It is the container for the multiple documents the child forms within an MDI application. You can use the IsMDIContainer property to create an MDI parent form. Follow these steps to create an MDI parent form:

  1. Create a new form and open it in the Code window.
  2. In the constructor for your form, add the following code:
    Me.IsMDIContainer = True

It is convenient for the user to interact with MDI child forms when the parent form is maximized. You can maximize the parent form by setting its WindowState property to Maximized.

Creating MDI Child Forms

MDI child forms are forms that operate within an MDI parent form in an MDI application. In an MDI application, these are often the forms with which the user interacts the most. Creating MDI child forms is a step-by-step procedure that we walk through in Exercise 7.1.

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Legal Software
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.