Sie sind auf Seite 1von 20

DEPARTMENT OF TECHNICAL EDUCATION

ANDHRA PRADESH

Name of the Faculty : NAND KISHORE SINGH


Designation : LECTURER
Branch : DCCP
Institute : SGMGPT, Abdullapurmet
Year/Semester : V
Subject : VISUAL BASIC-I
Subject Code : CCP-503
Topic : MDI Applications and
Graphics
Duration : 50 Minutes
Sub-Topic : Creation of MDI Applications
Teaching Aids : PPT, Animations and Photographs

CCP503.45 1
Recap
 Parent Form is container for Child Forms
 Menus & Buttons only appear on Parent Form
 Menus of selected Child forms appear on
Parent form
 Only one form can be active at a time
 MDI Form closes all Child Forms

CCP503.45 2
Objectives
On completion of this period, you will be able
to know:

 Creation of MDI Applications with an example

CCP503.45 3
MDI Applications

Creating MDl Application


 We create a simple MDI application with
two child forms
 A basic MDI application needs at least
two forms:
 One MDI form and a child form

CCP503.45 4
MDI Applications

 To create the MDI form, the “Add MDI Form”


option is chosen from the “Project menu”

CCP503.45 5
MDI Applications

Note: An application can have only one MDl


form. If a project already has a MDI form, the
Add MDl Form command on the Project menu
is unavailable.

CCP503.45 6
MDI Applications

To create a MDI child form, we select the


“Add Form” option of the Project menu
(or open an existing one) and set its
“MDI Child property to True”

CCP503.45 7
MDI Applications

Visual Basic displays special icons in the


Project Explorer for the MDI and MDI child
forms

CCP503.45 8
MDI Applications

The MDIForm requires a menu, which helps


us access the child forms.

CCP503.45 9
MDI Applications
The following figures help us reinforce this
concept

Fig.1
CCP503.45 10
MDI Applications

In the code window of the MDI form


we write statements to load the
respective form when the Submenu
options are clicked.

CCP503.45 11
MDI Applications

For example, refer Figure 1, to load


the “Input Form” the following line of
code needs to be included in the
click event of the submenu option:
“Load Input_frm”

CCP503.45 12
MDI Applications

In the code window of the child form


write code to display an inputbox,
which accepts name (Input Box
function) and displays a message
(MsgBox function).

CCP503.45 13
MDI Applications
When this MDl application is run get
to see the following screens:

Fig.2
CCP503.45 14
MDI Applications

Fig.3

CCP503.45 15
MDI Applications
Figure shows the child forms “Input form” and
“Fun form” within the parent form MDIform1

Fig.4
CCP503.45 16
Summary
 Created MDI application by taking MDI form
and two child forms
 Access to child forms is done through Menus

CCP503.45 17
Quiz
1. MDI stands for ____________

 Many Development Interface


 Multiple Document Interface
 Multiple Development Interface
 B&C

CCP503.45 18
Frequently Asked Questions
1. Expand MDI and write the steps to create MDI
Form ?

CCP503.45 19
Assignment
1. Create an MDI form with 4 child forms without
any functionality

CCP503.45 20

Das könnte Ihnen auch gefallen