Sei sulla pagina 1di 15

9/12/2013

Slide 1 of 13

Session 6
MDI Applications and Menus

9/12/2013

Slide 2 of 26

Module Introduction
Welcome to the module, MDI Applications and Menus. - MDI applications provide simultaneous access to multiple documents in a single window. - Menus to navigate through different child forms. In this module, you will learn about: + Multiple Document Interface Applications + Menus + ToolStrip Control + StatusStrip Control

9/12/2013

Slide 3 of 26

Document Interfaces
An application can contain multiple forms, which are used for collecting and displaying varied information.

9/12/2013

Slide 4 of 26

MDI Parent Forms


+ An MDI application consists of a parent form and multiple child forms. + All the child forms are opened within parent form. Thus, it acts as a container that can hold all child forms. The isMdiContainer property of the form can be used to create an MDI form. this.IsMdiContainer = true;

9/12/2013

Slide 5 of 26

MDI Child Forms


The MDI child forms are the sub-forms that are opened within the parent form.

9/12/2013

Slide 6 of 26

Properties, Methods, and Events

9/12/2013

Slide 7 of 26

Menu System
The menu system in Windows Forms consists of the main menu panel. The main menu panel consists of menu bars and various sub-menus.

9/12/2013

Slide 8 of 26

Menu Structures
There are two types of menus in Windows Forms namely, main menu and context menu. + The main menu, also known as anchored menus, appears on the menu bar of the form. + Context menu, also known as popup menu, are menus that appear when you click the right mouse button.

9/12/2013

Slide 9 of 26

"MenuStrip" Control
The MenuStrip control helps you to add new menus, modify and reorder existing menus, and delete old menus. You can also use the access keys, check marks, images, and separator bars to improve the usability of menus.

9/12/2013

Slide 10 of 26

Properties, Methods, and Events


The MenuStrip class is used to create the MenuStrip control and it exists in the System.Windows.Forms namespace. It is inherited from the ToolStrip class.

9/12/2013

Slide 11 of 26

"ToolStripMenultem" Control
The ToolstripMenuItern class provides various properties, which enable you to modify the appearance and functionality of a menu item.

9/12/2013

Slide 12 of 26

"ContextMenuStrip" Control
The ContextMenuStrip control is used to provide a short cut for accessing menu options displayed on the menu bar. It is similar to the context menu that appears in Microsoft Word application, when you right-click on the document.

9/12/2013

Slide 13 of 26

"Menu" Class
The Menu class allows you to create menus. This class is the base class for MainMenu, MenuItem, and ContextMenu classes.

9/12/2013

Slide 14 of 26

"ToolStrip" Control
You will find it faster and more convenient to use the icons on the toolbar instead of the menus. In Visual Studio 2005, the ToolStrip control serves the purpose of the toolbar.

9/12/2013

Slide 15 of 26

"StatusStrip" Control
The StatusStrip control is used to display useful information about the task being carried out or various controls in use. It is displayed at the bottom of the form. It can be used to display a progress bar too.

Potrebbero piacerti anche