SlideShare a Scribd company logo
1 of 36
Creating Menus and Working with MDI Applications

Objectives
In this lesson, you will learn to:
Create menus and submenus
Create an MDI application
Create toolbars
Create context menus
Add a status bar to a Windows Application Form




   ©NIIT      Creating Menus and Working with MDI Applications/Lesson 9/Slide 1 of 36
Creating Menus and Working with MDI Applications

Menus in Visual Basic .NET
Help in enhancing the user interface of an application.
Offer a convenient and consistent way to organize related
      options into a group.
Are of two types:
    Menus that appear on the menu bar.
    Context menus, which appear when the right mouse
     button is clicked.




   ©NIIT     Creating Menus and Working with MDI Applications/Lesson 9/Slide 2 of 36
Creating Menus and Working with MDI Applications

Menus that appear on the menu bar
Are created using the MainMenu object, which is a
collection of MenuItem objects that are used to add
individual menu items to the menu bar.
Can be added either at the design time or at run time.

Context Menus
Contain the most frequently used menu options.
Can be added to a form either at design time or at run time.




   ©NIIT     Creating Menus and Working with MDI Applications/Lesson 9/Slide 3 of 36
Creating Menus and Working with MDI Applications

MDI Applications
Allow you to display multiple windows at the same time,
with each form sharing a parent‑child relationship.
Consist of MDI parent forms and MDI child forms.
Require an MDI parent form to be created either at design
       time or at run time by setting the IsMdiContainer
property of    the form to true.




   ©NIIT    Creating Menus and Working with MDI Applications/Lesson 9/Slide 4 of 36
Creating Menus and Working with MDI Applications

Just a Minute…
2. How can you specify a Windows Form to be a MDI Parent
   form?
3. Fill in the blank:
    ______________ objects are added to the
   ____________ collection to include menu options to a
   Windows form.




   ©NIIT      Creating Menus and Working with MDI Applications/Lesson 9/Slide 5 of 36
Creating Menus and Working with MDI Applications

Problem Statement 9.D.1
The data entry application at the call centers of Diaz
Telecommunications should enable users to access multiple
data entry forms. To allow easy access to different data entry
forms, the data entry application should provide a user-friendly
interface. It should also allow users to access the monthly
sales report for data analysis. In addition, the users should be
able to exit the data entry application when required. The
forms that the users at the call centers of Diaz
Telecommunications should be able to access are Customer
Details form, Employee Details form, and Order Details form.




   ©NIIT     Creating Menus and Working with MDI Applications/Lesson 9/Slide 6 of 36
Creating Menus and Working with MDI Applications

Task List
Identify the objects to be integrated.
Identify the mechanism to integrate the objects.
Design the required integration.
Perform the appropriate steps to integrate the application.
Save the application.
Run the application and access the options.




   ©NIIT     Creating Menus and Working with MDI Applications/Lesson 9/Slide 7 of 36
Creating Menus and Working with MDI Applications

Task 1: Identify the objects to be integrated.
Result:
As per the problem statement, you need to integrate four
  data entry forms and the monthly sales report. You also
need to provide an Exit option to users.




   ©NIIT    Creating Menus and Working with MDI Applications/Lesson 9/Slide 8 of 36
Creating Menus and Working with MDI Applications

Task 2: Identify the mechanism to integrate the objects.
Result:
As per the problem statement, you need to integrate the
Customer Details, Employee Details, and Order Details
forms and the monthly sales report so that the users at Diaz
       Telecommunications can access the forms and the
report using a single data entry application.
To integrate these forms and the report, you need to create
       an MDI application. The MDI application will have a
single MDI Parent form and four MDI Child forms to display
the    data entry forms in separate windows. You also need
to add menus to the MDI parent form to enable users to
switch between the forms.


   ©NIIT     Creating Menus and Working with MDI Applications/Lesson 9/Slide 9 of 36
Creating Menus and Working with MDI Applications

Task 2: Identify the mechanism to integrate the
objects. (Contd.)
      Purpose                        Name                 Text         Level        Grouped Under


 Data Entry Forms          mnudataentryforms      Data Entry Forms    1


 Customer Details          mnucustomer            Customer Details    2        mnudataentryform
                                                                                s

 Order Details             mnuorder               Order Details       2        mnudataentryform
                                                                                s

 Employee Details          mnuemployee            Employee Details    2        mnudataentryform
                                                                                s

 Report                    mnureports             Report              1         


 Monthly Sales              mnumonthlyreport       Monthly Sales      2        mnureports
 Report                                           Report

 Quit the application      mnuexit                Exit                1         




    ©NIIT               Creating Menus and Working with MDI Applications/Lesson 9/Slide 10 of 36
Creating Menus and Working with MDI Applications

Task 3: Design the required integration.
Result:
The menus can be organized as given below:




   ©NIIT   Creating Menus and Working with MDI Applications/Lesson 9/Slide 11 of 36
Creating Menus and Working with MDI Applications

Task 4: Perform the appropriate steps to integrate
the application.
Task 5: Save the application.
Task 6: Run the application.




   ©NIIT   Creating Menus and Working with MDI Applications/Lesson 9/Slide 12 of 36
Creating Menus and Working with MDI Applications

Just a Minute…
In an MDI application, you need to ensure that when the
Product menu option is clicked, the Product form is displayed.
Complete the code to display the Product form.




   ©NIIT    Creating Menus and Working with MDI Applications/Lesson 9/Slide 13 of 36
Creating Menus and Working with MDI Applications

Problem Statement 9.D.2
The users at the call centers of Diaz Telecommunications
frequently need to access the Customer Details form, the
Order Details forms, and the Exit options. Therefore, the Data
Entry Application project should enable users to access these
options easily.




   ©NIIT    Creating Menus and Working with MDI Applications/Lesson 9/Slide 14 of 36
Creating Menus and Working with MDI Applications

Task List
Identify the technique to provide easy access to menu
items.
Identify the menu items frequently accessed.
Perform the appropriate steps to provide easy access.
Save the application.
Run the application and access the options.




   ©NIIT    Creating Menus and Working with MDI Applications/Lesson 9/Slide 15 of 36
Creating Menus and Working with MDI Applications

Task 1: Identify the technique to provide easy access
to menu items.
Result:
You should use context menus to provide easy access to
 menu items.




   ©NIIT   Creating Menus and Working with MDI Applications/Lesson 9/Slide 16 of 36
Creating Menus and Working with MDI Applications

Task 2: Identify the menu items frequently accessed.
Result:
As per the problem statement, the Customer Details form,
       the Order Details form, and the Exit options are
frequently    accessed.




   ©NIIT   Creating Menus and Working with MDI Applications/Lesson 9/Slide 17 of 36
Creating Menus and Working with MDI Applications

Task 3: Perform the appropriate steps to provide
easy access.
Task 4: Save the application.
Task 5: Run the application and access the options.




   ©NIIT   Creating Menus and Working with MDI Applications/Lesson 9/Slide 18 of 36
Creating Menus and Working with MDI Applications

Just a Minute…
You have added a ContextMenu control to a Windows form.
The ContextMenu control has the default name
ContextMenu1. You have added three MenuItems named
Product, Customer, and Sales to the ContextMenu1. How
would you ensure that the MenuItems added to the
ContextMenu1 would be displayed when a user right-clicks the
Windows form?




   ©NIIT   Creating Menus and Working with MDI Applications/Lesson 9/Slide 19 of 36
Creating Menus and Working with MDI Applications

Problem Statement 9.P.1
The users at the call centers of Diaz Telecommunications
should be able use an application that can integrate the
Customer Details form, the Order Details form, and the
Employee Details form. The application should also provide
options to access the daily sales report and invoke the Print
dialog box. In addition, the users should easily be able to
terminate the application. The application should also include
options to access the Order Details form and terminate the
application quickly.




   ©NIIT    Creating Menus and Working with MDI Applications/Lesson 9/Slide 20 of 36
Creating Menus and Working with MDI Applications

Toolbar
Is a graphical alternative to a menu.
Contains buttons that provide quick access to the most
frequently used options in an application.
Can be created in a Windows application by adding the
ToolBar control to a Windows Form.




   ©NIIT    Creating Menus and Working with MDI Applications/Lesson 9/Slide 21 of 36
Creating Menus and Working with MDI Applications

Problem Statement 9.D.3
The users at the call centers of Diaz Telecommunications
access the Customer Details, the Order details and the Exit
options frequently. To facilitate quick access to these options,
provide users with a graphical interface.




   ©NIIT    Creating Menus and Working with MDI Applications/Lesson 9/Slide 22 of 36
Creating Menus and Working with MDI Applications

Task List
Identify the menu options most frequently used.
Identify a mechanism to provide graphical access.
Perform the appropriate steps to provide easy access.
Save the application.
Run the application.




   ©NIIT    Creating Menus and Working with MDI Applications/Lesson 9/Slide 23 of 36
Creating Menus and Working with MDI Applications

Task 1: Identify the menu options most frequently
used.
Result:
As per the problem statement, the Customer Details,
Order details and Exit options are most frequently accessed.




   ©NIIT   Creating Menus and Working with MDI Applications/Lesson 9/Slide 24 of 36
Creating Menus and Working with MDI Applications

Task 2: Identify a mechanism to provide graphical
access.
Result:
A toolbar provides easy access to the frequently used menu
      options.




   ©NIIT   Creating Menus and Working with MDI Applications/Lesson 9/Slide 25 of 36
Creating Menus and Working with MDI Applications

Task 3: Perform the appropriate steps to provide
easy access.
Task 4: Save the application.
Task 5: Run the application.




   ©NIIT   Creating Menus and Working with MDI Applications/Lesson 9/Slide 26 of 36
Creating Menus and Working with MDI Applications

Just a Minute…
2. Fill in the blank:
    You can add buttons to a ToolBar control by accessing
   the _____________________ Editor.




   ©NIIT     Creating Menus and Working with MDI Applications/Lesson 9/Slide 27 of 36
Creating Menus and Working with MDI Applications

Just a Minute… (Contd.)
2. You have added a toolbar control and an ImageList control
   to the form, Form1. You have added four buttons to the
   ToolBar1 and four .bmps to the ImageList1.You need to
   specify the images for each of the ToolBar buttons based
   on the following table:
   ToolBar Button Name         ImageName                    Position of the image in
                                                            the ImageList collection
   TbProduct                   ProductImage                 0

   TbCustomer                  CustomerImage                1

   TbSales                     SalesImage                   2

   TbExit                      ExitImage                    3




   ©NIIT        Creating Menus and Working with MDI Applications/Lesson 9/Slide 28 of 36
Creating Menus and Working with MDI Applications

Problem Statement 9.D.4
While entering details about the customers, orders, and
employees, the users at Diaz Telecommunications should be
provided with some information about the data to be entered
in the controls. Update the Data Entry Application project to
reflect the requirement.




   ©NIIT    Creating Menus and Working with MDI Applications/Lesson 9/Slide 29 of 36
Creating Menus and Working with MDI Applications

Task List
Identify the information to be displayed.
Identify the mechanism to display the required information.
Perform the appropriate steps to display the information.
Save the application.
Run the application and view the information.




   ©NIIT    Creating Menus and Working with MDI Applications/Lesson 9/Slide 30 of 36
Creating Menus and Working with MDI Applications

Task 1: Identify the information to be displayed.
Result:
As per the problem statement, the relevant information for
 each data entry form needs to be displayed.




   ©NIIT    Creating Menus and Working with MDI Applications/Lesson 9/Slide 31 of 36
Creating Menus and Working with MDI Applications

Task 2: Identify the mechanism to display the
required information.
The StatusBar Control
    Is typically displayed at the bottom of an application
     window and is used to display information about the
     current state of the application.
    Has panels that can display individual pieces of
     information.However, you need to set the ShowPanels
     property of the StatusBar control to true to use multiple
     panels in the status bar.
    Can also contain text to display informative messages,
     such as the use of the displayed form in an MDI
     application.

   ©NIIT   Creating Menus and Working with MDI Applications/Lesson 9/Slide 32 of 36
Creating Menus and Working with MDI Applications

Task 2: Identify the mechanism to display the
required information. (Contd.)
Result:
You should use a status bar to display the relevant
information about the data entry forms.




   ©NIIT    Creating Menus and Working with MDI Applications/Lesson 9/Slide 33 of 36
Creating Menus and Working with MDI Applications

Task 3: Perform the appropriate steps to display the
information.
Task 4: Save the application.
Task 5: Run the application and view the information.




   ©NIIT   Creating Menus and Working with MDI Applications/Lesson 9/Slide 34 of 36
Creating Menus and Working with MDI Applications

Just a Minute…
2. Fill in the blank:
   The _______ property of the StatusBar enables you to
     specify the message that will be displayed in the
   StatusBar panel.
4. You have added a panel in the StatusBar1. How would you
   ensure that the panel size gets adjusted based on the size
   of the text it will hold?




   ©NIIT     Creating Menus and Working with MDI Applications/Lesson 9/Slide 35 of 36
Creating Menus and Working with MDI Applications

Summary
In this lesson, you learned that:
MDI applications enable you to integrate different parts of
     an application.
Menus are used to provide a user-friendly interface for
accessing options.
Context menus enable users to access the most frequently
     used options.
The ToolBar control enables the use of graphical objects to
      access the most frequently used options.
The ImageList control can be used to add images to the
ToolBar control.
The StatusBar control can be used to display relevant
information about the application.
   ©NIIT    Creating Menus and Working with MDI Applications/Lesson 9/Slide 36 of 36

More Related Content

Viewers also liked (14)

Dacj 1-3 c
Dacj 1-3 cDacj 1-3 c
Dacj 1-3 c
 
Dacj 2-1 b
Dacj 2-1 bDacj 2-1 b
Dacj 2-1 b
 
Ajs 2 c
Ajs 2 cAjs 2 c
Ajs 2 c
 
Aae oop xp_01
Aae oop xp_01Aae oop xp_01
Aae oop xp_01
 
15 ooad uml-20
15 ooad uml-2015 ooad uml-20
15 ooad uml-20
 
Arrays
ArraysArrays
Arrays
 
Ms visual-basic-6
Ms visual-basic-6Ms visual-basic-6
Ms visual-basic-6
 
Vb 6.0 controls
Vb 6.0 controlsVb 6.0 controls
Vb 6.0 controls
 
Comp tia n+_session_11
Comp tia n+_session_11Comp tia n+_session_11
Comp tia n+_session_11
 
Ajs 4 a
Ajs 4 aAjs 4 a
Ajs 4 a
 
Ajs 4 b
Ajs 4 bAjs 4 b
Ajs 4 b
 
Crj 3 1-b
Crj 3 1-bCrj 3 1-b
Crj 3 1-b
 
NIIT Presentation 1
NIIT Presentation 1NIIT Presentation 1
NIIT Presentation 1
 
Ajs 1 b
Ajs 1 bAjs 1 b
Ajs 1 b
 

Similar to Vb net xp_09

Vb net xp_12
Vb net xp_12Vb net xp_12
Vb net xp_12Niit Care
 
C# Tutorial MSM_Murach chapter-24-slides
C# Tutorial MSM_Murach chapter-24-slidesC# Tutorial MSM_Murach chapter-24-slides
C# Tutorial MSM_Murach chapter-24-slidesSami Mut
 
Retail market infromation system android application-15968
Retail market infromation system   android application-15968Retail market infromation system   android application-15968
Retail market infromation system android application-15968pradip patel
 
IRJET- Tiffin Services Application and Live Tracking
IRJET-  	  Tiffin Services Application and Live TrackingIRJET-  	  Tiffin Services Application and Live Tracking
IRJET- Tiffin Services Application and Live TrackingIRJET Journal
 
Vb net xp_08
Vb net xp_08Vb net xp_08
Vb net xp_08Niit Care
 
What are the Features of Form Builder
What are the Features of Form BuilderWhat are the Features of Form Builder
What are the Features of Form BuilderSophiae3
 
Kisan Monitoring System Focused on Android based Application
Kisan Monitoring System Focused on Android based ApplicationKisan Monitoring System Focused on Android based Application
Kisan Monitoring System Focused on Android based ApplicationIRJET Journal
 
IRJET- I Smart Solution Application : Review
IRJET-  	  I Smart Solution Application : ReviewIRJET-  	  I Smart Solution Application : Review
IRJET- I Smart Solution Application : ReviewIRJET Journal
 
Tackling Billing Challenges in Relativity Webinar Presentation
Tackling Billing Challenges in Relativity Webinar PresentationTackling Billing Challenges in Relativity Webinar Presentation
Tackling Billing Challenges in Relativity Webinar PresentationYuliyana Mihaylova
 
Vb net xp_14
Vb net xp_14Vb net xp_14
Vb net xp_14Niit Care
 
IRJET- City Complaint Management System
IRJET-  	  City Complaint Management SystemIRJET-  	  City Complaint Management System
IRJET- City Complaint Management SystemIRJET Journal
 
CRICOS Provider No. 00103D ITECH1400 Foundations of Progra.docx
CRICOS Provider No. 00103D ITECH1400 Foundations of Progra.docxCRICOS Provider No. 00103D ITECH1400 Foundations of Progra.docx
CRICOS Provider No. 00103D ITECH1400 Foundations of Progra.docxfaithxdunce63732
 
E-Trading of Agricultural Products from Farm to Customer Application
E-Trading of Agricultural Products from Farm to Customer ApplicationE-Trading of Agricultural Products from Farm to Customer Application
E-Trading of Agricultural Products from Farm to Customer ApplicationIRJET Journal
 
Project report on multiplex management system
Project report on multiplex management systemProject report on multiplex management system
Project report on multiplex management systemSavita Sharma
 
Widget Fq Contact Research
Widget Fq Contact ResearchWidget Fq Contact Research
Widget Fq Contact ResearchJessica Cannella
 
bmc report.pdf
bmc report.pdfbmc report.pdf
bmc report.pdfUrvi Patel
 

Similar to Vb net xp_09 (20)

Vb net xp_12
Vb net xp_12Vb net xp_12
Vb net xp_12
 
C# Tutorial MSM_Murach chapter-24-slides
C# Tutorial MSM_Murach chapter-24-slidesC# Tutorial MSM_Murach chapter-24-slides
C# Tutorial MSM_Murach chapter-24-slides
 
Retail market infromation system android application-15968
Retail market infromation system   android application-15968Retail market infromation system   android application-15968
Retail market infromation system android application-15968
 
IRJET- Tiffin Services Application and Live Tracking
IRJET-  	  Tiffin Services Application and Live TrackingIRJET-  	  Tiffin Services Application and Live Tracking
IRJET- Tiffin Services Application and Live Tracking
 
Vb net xp_08
Vb net xp_08Vb net xp_08
Vb net xp_08
 
What are the Features of Form Builder
What are the Features of Form BuilderWhat are the Features of Form Builder
What are the Features of Form Builder
 
Kisan Monitoring System Focused on Android based Application
Kisan Monitoring System Focused on Android based ApplicationKisan Monitoring System Focused on Android based Application
Kisan Monitoring System Focused on Android based Application
 
IRJET- I Smart Solution Application : Review
IRJET-  	  I Smart Solution Application : ReviewIRJET-  	  I Smart Solution Application : Review
IRJET- I Smart Solution Application : Review
 
04 gui 05
04 gui 0504 gui 05
04 gui 05
 
Tackling Billing Challenges in Relativity Webinar Presentation
Tackling Billing Challenges in Relativity Webinar PresentationTackling Billing Challenges in Relativity Webinar Presentation
Tackling Billing Challenges in Relativity Webinar Presentation
 
Vb net xp_14
Vb net xp_14Vb net xp_14
Vb net xp_14
 
IRJET- City Complaint Management System
IRJET-  	  City Complaint Management SystemIRJET-  	  City Complaint Management System
IRJET- City Complaint Management System
 
CRICOS Provider No. 00103D ITECH1400 Foundations of Progra.docx
CRICOS Provider No. 00103D ITECH1400 Foundations of Progra.docxCRICOS Provider No. 00103D ITECH1400 Foundations of Progra.docx
CRICOS Provider No. 00103D ITECH1400 Foundations of Progra.docx
 
IBM Cognos TM1
IBM Cognos TM1IBM Cognos TM1
IBM Cognos TM1
 
E-Trading of Agricultural Products from Farm to Customer Application
E-Trading of Agricultural Products from Farm to Customer ApplicationE-Trading of Agricultural Products from Farm to Customer Application
E-Trading of Agricultural Products from Farm to Customer Application
 
Project report on multiplex management system
Project report on multiplex management systemProject report on multiplex management system
Project report on multiplex management system
 
Project Report
Project ReportProject Report
Project Report
 
FinalProjectReport
FinalProjectReportFinalProjectReport
FinalProjectReport
 
Widget Fq Contact Research
Widget Fq Contact ResearchWidget Fq Contact Research
Widget Fq Contact Research
 
bmc report.pdf
bmc report.pdfbmc report.pdf
bmc report.pdf
 

More from Niit Care (20)

Ajs 4 c
Ajs 4 cAjs 4 c
Ajs 4 c
 
Ajs 3 b
Ajs 3 bAjs 3 b
Ajs 3 b
 
Ajs 3 a
Ajs 3 aAjs 3 a
Ajs 3 a
 
Ajs 3 c
Ajs 3 cAjs 3 c
Ajs 3 c
 
Ajs 2 b
Ajs 2 bAjs 2 b
Ajs 2 b
 
Ajs 2 a
Ajs 2 aAjs 2 a
Ajs 2 a
 
Ajs 1 a
Ajs 1 aAjs 1 a
Ajs 1 a
 
Ajs 1 c
Ajs 1 cAjs 1 c
Ajs 1 c
 
Dacj 4 2-c
Dacj 4 2-cDacj 4 2-c
Dacj 4 2-c
 
Dacj 4 2-b
Dacj 4 2-bDacj 4 2-b
Dacj 4 2-b
 
Dacj 4 2-a
Dacj 4 2-aDacj 4 2-a
Dacj 4 2-a
 
Dacj 4 1-c
Dacj 4 1-cDacj 4 1-c
Dacj 4 1-c
 
Dacj 4 1-b
Dacj 4 1-bDacj 4 1-b
Dacj 4 1-b
 
Dacj 1-2 b
Dacj 1-2 bDacj 1-2 b
Dacj 1-2 b
 
Dacj 1-3 b
Dacj 1-3 bDacj 1-3 b
Dacj 1-3 b
 
Dacj 1-3 a
Dacj 1-3 aDacj 1-3 a
Dacj 1-3 a
 
Dacj 1-2 c
Dacj 1-2 cDacj 1-2 c
Dacj 1-2 c
 
Dacj 1-2 a
Dacj 1-2 aDacj 1-2 a
Dacj 1-2 a
 
Dacj 1-1 c
Dacj 1-1 cDacj 1-1 c
Dacj 1-1 c
 
Dacj 1-1 b
Dacj 1-1 bDacj 1-1 b
Dacj 1-1 b
 

Recently uploaded

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 

Recently uploaded (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

Vb net xp_09

  • 1. Creating Menus and Working with MDI Applications Objectives In this lesson, you will learn to: Create menus and submenus Create an MDI application Create toolbars Create context menus Add a status bar to a Windows Application Form ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 1 of 36
  • 2. Creating Menus and Working with MDI Applications Menus in Visual Basic .NET Help in enhancing the user interface of an application. Offer a convenient and consistent way to organize related options into a group. Are of two types: Menus that appear on the menu bar. Context menus, which appear when the right mouse button is clicked. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 2 of 36
  • 3. Creating Menus and Working with MDI Applications Menus that appear on the menu bar Are created using the MainMenu object, which is a collection of MenuItem objects that are used to add individual menu items to the menu bar. Can be added either at the design time or at run time. Context Menus Contain the most frequently used menu options. Can be added to a form either at design time or at run time. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 3 of 36
  • 4. Creating Menus and Working with MDI Applications MDI Applications Allow you to display multiple windows at the same time, with each form sharing a parent‑child relationship. Consist of MDI parent forms and MDI child forms. Require an MDI parent form to be created either at design time or at run time by setting the IsMdiContainer property of the form to true. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 4 of 36
  • 5. Creating Menus and Working with MDI Applications Just a Minute… 2. How can you specify a Windows Form to be a MDI Parent form? 3. Fill in the blank: ______________ objects are added to the ____________ collection to include menu options to a Windows form. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 5 of 36
  • 6. Creating Menus and Working with MDI Applications Problem Statement 9.D.1 The data entry application at the call centers of Diaz Telecommunications should enable users to access multiple data entry forms. To allow easy access to different data entry forms, the data entry application should provide a user-friendly interface. It should also allow users to access the monthly sales report for data analysis. In addition, the users should be able to exit the data entry application when required. The forms that the users at the call centers of Diaz Telecommunications should be able to access are Customer Details form, Employee Details form, and Order Details form. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 6 of 36
  • 7. Creating Menus and Working with MDI Applications Task List Identify the objects to be integrated. Identify the mechanism to integrate the objects. Design the required integration. Perform the appropriate steps to integrate the application. Save the application. Run the application and access the options. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 7 of 36
  • 8. Creating Menus and Working with MDI Applications Task 1: Identify the objects to be integrated. Result: As per the problem statement, you need to integrate four data entry forms and the monthly sales report. You also need to provide an Exit option to users. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 8 of 36
  • 9. Creating Menus and Working with MDI Applications Task 2: Identify the mechanism to integrate the objects. Result: As per the problem statement, you need to integrate the Customer Details, Employee Details, and Order Details forms and the monthly sales report so that the users at Diaz Telecommunications can access the forms and the report using a single data entry application. To integrate these forms and the report, you need to create an MDI application. The MDI application will have a single MDI Parent form and four MDI Child forms to display the data entry forms in separate windows. You also need to add menus to the MDI parent form to enable users to switch between the forms. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 9 of 36
  • 10. Creating Menus and Working with MDI Applications Task 2: Identify the mechanism to integrate the objects. (Contd.) Purpose Name Text Level Grouped Under Data Entry Forms mnudataentryforms Data Entry Forms 1 Customer Details mnucustomer Customer Details 2 mnudataentryform s Order Details mnuorder Order Details 2 mnudataentryform s Employee Details mnuemployee Employee Details 2 mnudataentryform s Report mnureports Report 1   Monthly Sales mnumonthlyreport Monthly Sales 2 mnureports Report Report Quit the application mnuexit Exit 1   ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 10 of 36
  • 11. Creating Menus and Working with MDI Applications Task 3: Design the required integration. Result: The menus can be organized as given below: ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 11 of 36
  • 12. Creating Menus and Working with MDI Applications Task 4: Perform the appropriate steps to integrate the application. Task 5: Save the application. Task 6: Run the application. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 12 of 36
  • 13. Creating Menus and Working with MDI Applications Just a Minute… In an MDI application, you need to ensure that when the Product menu option is clicked, the Product form is displayed. Complete the code to display the Product form. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 13 of 36
  • 14. Creating Menus and Working with MDI Applications Problem Statement 9.D.2 The users at the call centers of Diaz Telecommunications frequently need to access the Customer Details form, the Order Details forms, and the Exit options. Therefore, the Data Entry Application project should enable users to access these options easily. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 14 of 36
  • 15. Creating Menus and Working with MDI Applications Task List Identify the technique to provide easy access to menu items. Identify the menu items frequently accessed. Perform the appropriate steps to provide easy access. Save the application. Run the application and access the options. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 15 of 36
  • 16. Creating Menus and Working with MDI Applications Task 1: Identify the technique to provide easy access to menu items. Result: You should use context menus to provide easy access to menu items. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 16 of 36
  • 17. Creating Menus and Working with MDI Applications Task 2: Identify the menu items frequently accessed. Result: As per the problem statement, the Customer Details form, the Order Details form, and the Exit options are frequently accessed. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 17 of 36
  • 18. Creating Menus and Working with MDI Applications Task 3: Perform the appropriate steps to provide easy access. Task 4: Save the application. Task 5: Run the application and access the options. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 18 of 36
  • 19. Creating Menus and Working with MDI Applications Just a Minute… You have added a ContextMenu control to a Windows form. The ContextMenu control has the default name ContextMenu1. You have added three MenuItems named Product, Customer, and Sales to the ContextMenu1. How would you ensure that the MenuItems added to the ContextMenu1 would be displayed when a user right-clicks the Windows form? ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 19 of 36
  • 20. Creating Menus and Working with MDI Applications Problem Statement 9.P.1 The users at the call centers of Diaz Telecommunications should be able use an application that can integrate the Customer Details form, the Order Details form, and the Employee Details form. The application should also provide options to access the daily sales report and invoke the Print dialog box. In addition, the users should easily be able to terminate the application. The application should also include options to access the Order Details form and terminate the application quickly. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 20 of 36
  • 21. Creating Menus and Working with MDI Applications Toolbar Is a graphical alternative to a menu. Contains buttons that provide quick access to the most frequently used options in an application. Can be created in a Windows application by adding the ToolBar control to a Windows Form. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 21 of 36
  • 22. Creating Menus and Working with MDI Applications Problem Statement 9.D.3 The users at the call centers of Diaz Telecommunications access the Customer Details, the Order details and the Exit options frequently. To facilitate quick access to these options, provide users with a graphical interface. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 22 of 36
  • 23. Creating Menus and Working with MDI Applications Task List Identify the menu options most frequently used. Identify a mechanism to provide graphical access. Perform the appropriate steps to provide easy access. Save the application. Run the application. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 23 of 36
  • 24. Creating Menus and Working with MDI Applications Task 1: Identify the menu options most frequently used. Result: As per the problem statement, the Customer Details, Order details and Exit options are most frequently accessed. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 24 of 36
  • 25. Creating Menus and Working with MDI Applications Task 2: Identify a mechanism to provide graphical access. Result: A toolbar provides easy access to the frequently used menu options. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 25 of 36
  • 26. Creating Menus and Working with MDI Applications Task 3: Perform the appropriate steps to provide easy access. Task 4: Save the application. Task 5: Run the application. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 26 of 36
  • 27. Creating Menus and Working with MDI Applications Just a Minute… 2. Fill in the blank: You can add buttons to a ToolBar control by accessing the _____________________ Editor. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 27 of 36
  • 28. Creating Menus and Working with MDI Applications Just a Minute… (Contd.) 2. You have added a toolbar control and an ImageList control to the form, Form1. You have added four buttons to the ToolBar1 and four .bmps to the ImageList1.You need to specify the images for each of the ToolBar buttons based on the following table: ToolBar Button Name ImageName Position of the image in the ImageList collection TbProduct ProductImage 0 TbCustomer CustomerImage 1 TbSales SalesImage 2 TbExit ExitImage 3 ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 28 of 36
  • 29. Creating Menus and Working with MDI Applications Problem Statement 9.D.4 While entering details about the customers, orders, and employees, the users at Diaz Telecommunications should be provided with some information about the data to be entered in the controls. Update the Data Entry Application project to reflect the requirement. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 29 of 36
  • 30. Creating Menus and Working with MDI Applications Task List Identify the information to be displayed. Identify the mechanism to display the required information. Perform the appropriate steps to display the information. Save the application. Run the application and view the information. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 30 of 36
  • 31. Creating Menus and Working with MDI Applications Task 1: Identify the information to be displayed. Result: As per the problem statement, the relevant information for each data entry form needs to be displayed. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 31 of 36
  • 32. Creating Menus and Working with MDI Applications Task 2: Identify the mechanism to display the required information. The StatusBar Control Is typically displayed at the bottom of an application window and is used to display information about the current state of the application. Has panels that can display individual pieces of information.However, you need to set the ShowPanels property of the StatusBar control to true to use multiple panels in the status bar. Can also contain text to display informative messages, such as the use of the displayed form in an MDI application. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 32 of 36
  • 33. Creating Menus and Working with MDI Applications Task 2: Identify the mechanism to display the required information. (Contd.) Result: You should use a status bar to display the relevant information about the data entry forms. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 33 of 36
  • 34. Creating Menus and Working with MDI Applications Task 3: Perform the appropriate steps to display the information. Task 4: Save the application. Task 5: Run the application and view the information. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 34 of 36
  • 35. Creating Menus and Working with MDI Applications Just a Minute… 2. Fill in the blank: The _______ property of the StatusBar enables you to specify the message that will be displayed in the StatusBar panel. 4. You have added a panel in the StatusBar1. How would you ensure that the panel size gets adjusted based on the size of the text it will hold? ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 35 of 36
  • 36. Creating Menus and Working with MDI Applications Summary In this lesson, you learned that: MDI applications enable you to integrate different parts of an application. Menus are used to provide a user-friendly interface for accessing options. Context menus enable users to access the most frequently used options. The ToolBar control enables the use of graphical objects to access the most frequently used options. The ImageList control can be used to add images to the ToolBar control. The StatusBar control can be used to display relevant information about the application. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 36 of 36