A multiple document interface is used for opening many windows at the same time. All the document windows are contained in a parent window, which provides a workspace in the application. Visual Basic applications can have only one MDI form, which contains all the child forms. A child form is an ordinary form that has its child property set to True. Child forms are displayed within the internal area of a MDI form at run time.
Multiple Document Interface
Mainly there are two styles of interfaces in the windows based application: the single-document interface (SDI) and the multiple – document interface (MDI). An example of the SDI interface is the WordPad applications include with Microsoft windows. In WordPad, only a single document may be open and in order to open another, the currently opened. Document must be closed. The figure dhows the WordPad application, which is a SDI application.
Figure: WordPad , a single –document interface (SDI) application.
Applications such as Microsoft excel and Microsoft world for windows are MDI interfaces; they allow displaying multiple documents at the same time, with each documents displayed in its own window. A MDI application can be recognized by the inclusion of a window menu item with submenus for switching between windows or documents. The figure shows the excel, which is a MDI application.
Figure: Microsoft Excel, a multiple-document interface (MDI) application
In multiple document interfaces, documents or child windows are contained in a parent window, which provides a workspace for all the child windows in the application. For example, Microsoft excel allows to create and display multiple document windows of different types. Each individual window is confined to the area of the excel parent window. When the excel is minimized, all the document windows are minimized as well’ only the parent window’s icon appears in the task bar.
Menu
Any program with more than a few simple functions or features can benefit from the additional of a well built menu. When designing a program, the main goal is to make its features as easy as possible. A well designed menu will accomplish this goal. With the help of good menu, progr4mms will seem natural and familiar, as they offer as convenient and consistent way to group commands and an easy way for users to access them. The figure 5.3 illustrates the elements of a menu interface on a form.
Figure: the elements of a menu interface on a Form.
The menu bar appears immediately below the title bar on the form and contains one or more menu titles. When a menu title is clicked (such as File), a menu containing a list of menu items drops down. Menu items can included commands (such as new and exit), separator bars, and submenu titles. To make application easier to use, menu items must be grouped according to their function. In the above, for example, the file related commands new, open and save as are all found on the file menu.
Dynamic Data Exchange (DDE)
DDE is the basic foundation for interposes communication among Microsoft windows applications. In a DDE conversation, the application creates the link is known as the destination application, and the application that responds in known as a source application. (these used to be referred to as client and sever respectively). Any application that supports DDE can serve as either a source or a destination. One application can serve as both destination and a source with several other applications at the same time. Only one active DDE link should be established between a Visual Basic control or form and another application. For example, a link between a Microsoft excel spreadsheet cell and a text control is acceptable as long the parent form does not already have link with the same cell. You might cause an infinite loop of updates if there were more than one link between the same two applications.
Object Linking And Embedding (OLE)
OLE DB
|
OLE DB Service provider
OLE DB OLE DB OLE DB OLE DB
|
|
|
||||||||
OLE DB Data Providers
|
The primary focus of the ODBC is providing a consistent interface to database data sources. OLEDB is designed with an even broader goal in mind; to provide a methodology to access data regardless of the data source. As shown in figure OLEDB becomes the data access bridge for documents, e-mail systems, file systems, spreadsheets, and database sources using IDBC drivers.
Introduction to MDI form
In Visual Basic a child form is an ordinary form that has it MDI child property set to true. An application can include many MDI child forms of similar or different types. At run time, child forms are displayed within the workspace of the MDI parent form (the area inside he form’s borders and below the title and menu bars). When a child form is minimized, its icon appears within the workspace of the MDI form instead of on the task bar as in figure.
An MDI application can also include standard, now MDI forms that are not contained in the MDI form. A typical use of a standard form in a MDI application is to display a modal dialog box.
An MDI form is similar to an ordinary form with one restriction. Intrinsic controls can’t be placed on a MDI form unless they have he Align property (such as a picture box control) or invisible interface (such as a timer control). More over an application can have only one MDI form. The MDI form’s main property and method are given below:
Property Description
Active form it specifies the active MDI child form.
Method Description
Arrange arrange the windows or icons within a MDI form object
Syntax
MDI form. Arrange arrangement
A value or constant that specifies how to arrange windows or icons on a MDI form object, as described in Table.
Constant | Value | Description |
Vb Cascade | 2 | Cascades all non minimized MDI child form |
Vb title Horizontal | 1 | Tiles all non minimized MDI child forms horizontally |
Vb title Vertical | 2 | Tiles all non minimized MDI child forms vertically |
Vb arrange Icon | 3 | Arrange icons for minimized MDI child forms |
Example
To cascade the child forms or the MDI form 1 the following statement is used. MDI form1. Arrange Vb cascade
MDI Child Forms properties
MDI form and all of its child forms take on special characteristics:
- All child forms are displayed within the MDI form’s workspace. The user can move and size child forms like any other form; however, they are restricted to this workspace
- When a child form is minimized, its icon appears on ht MDI form instead of the taskbar. When the MDI form is minimized, the MDI form and all of its child forms are represented by a single icon. When the MDI form is restored, the MDI form and all the child forms are displayed in the same state they were in before being minimized.
- When a child form is maximized, its captions combined with the caption of the MDI form and is displayed in the MDI form’s title bar (see figure 5.5)
- The active child form’s menus (if any) are displayed on the MDI form’s menu bar, not on the child form.
Figure: A child form caption combined with the caption of an MDI form.