Your SlideShare is downloading. ×
0
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Vb net xp_09
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Vb net xp_09

228

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
228
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Creating Menus and Working with MDI ApplicationsObjectivesIn this lesson, you will learn to:Create menus and submenusCreate an MDI applicationCreate toolbarsCreate context menusAdd 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 ApplicationsMenus in Visual Basic .NETHelp 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 ApplicationsMenus that appear on the menu barAre created using the MainMenu object, which is acollection of MenuItem objects that are used to addindividual menu items to the menu bar.Can be added either at the design time or at run time.Context MenusContain 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 ApplicationsMDI ApplicationsAllow 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 IsMdiContainerproperty 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 ApplicationsJust 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 ApplicationsProblem Statement 9.D.1The data entry application at the call centers of DiazTelecommunications should enable users to access multipledata entry forms. To allow easy access to different data entryforms, the data entry application should provide a user-friendlyinterface. It should also allow users to access the monthlysales report for data analysis. In addition, the users should beable to exit the data entry application when required. Theforms that the users at the call centers of DiazTelecommunications should be able to access are CustomerDetails 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 ApplicationsTask ListIdentify 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 ApplicationsTask 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 alsoneed 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 ApplicationsTask 2: Identify the mechanism to integrate the objects.Result:As per the problem statement, you need to integrate theCustomer Details, Employee Details, and Order Detailsforms and the monthly sales report so that the users at Diaz Telecommunications can access the forms and thereport 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 asingle MDI Parent form and four MDI Child forms to displaythe data entry forms in separate windows. You also needto add menus to the MDI parent form to enable users toswitch between the forms. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 9 of 36
  • 10. Creating Menus and Working with MDI ApplicationsTask 2: Identify the mechanism to integrate theobjects. (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 ApplicationsTask 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 ApplicationsTask 4: Perform the appropriate steps to integratethe 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 ApplicationsJust a Minute…In an MDI application, you need to ensure that when theProduct 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 ApplicationsProblem Statement 9.D.2The users at the call centers of Diaz Telecommunicationsfrequently need to access the Customer Details form, theOrder Details forms, and the Exit options. Therefore, the DataEntry Application project should enable users to access theseoptions easily. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 14 of 36
  • 15. Creating Menus and Working with MDI ApplicationsTask ListIdentify the technique to provide easy access to menuitems.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 ApplicationsTask 1: Identify the technique to provide easy accessto 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 ApplicationsTask 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 arefrequently accessed. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 17 of 36
  • 18. Creating Menus and Working with MDI ApplicationsTask 3: Perform the appropriate steps to provideeasy 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 ApplicationsJust a Minute…You have added a ContextMenu control to a Windows form.The ContextMenu control has the default nameContextMenu1. You have added three MenuItems namedProduct, Customer, and Sales to the ContextMenu1. Howwould you ensure that the MenuItems added to theContextMenu1 would be displayed when a user right-clicks theWindows form? ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 19 of 36
  • 20. Creating Menus and Working with MDI ApplicationsProblem Statement 9.P.1The users at the call centers of Diaz Telecommunicationsshould be able use an application that can integrate theCustomer Details form, the Order Details form, and theEmployee Details form. The application should also provideoptions to access the daily sales report and invoke the Printdialog box. In addition, the users should easily be able toterminate the application. The application should also includeoptions to access the Order Details form and terminate theapplication quickly. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 20 of 36
  • 21. Creating Menus and Working with MDI ApplicationsToolbarIs a graphical alternative to a menu.Contains buttons that provide quick access to the mostfrequently used options in an application.Can be created in a Windows application by adding theToolBar 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 ApplicationsProblem Statement 9.D.3The users at the call centers of Diaz Telecommunicationsaccess the Customer Details, the Order details and the Exitoptions 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 ApplicationsTask ListIdentify 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 ApplicationsTask 1: Identify the menu options most frequentlyused.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 ApplicationsTask 2: Identify a mechanism to provide graphicalaccess.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 ApplicationsTask 3: Perform the appropriate steps to provideeasy 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 ApplicationsJust 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 ApplicationsJust 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 ApplicationsProblem Statement 9.D.4While entering details about the customers, orders, andemployees, the users at Diaz Telecommunications should beprovided with some information about the data to be enteredin the controls. Update the Data Entry Application project toreflect the requirement. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 29 of 36
  • 30. Creating Menus and Working with MDI ApplicationsTask ListIdentify 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 ApplicationsTask 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 ApplicationsTask 2: Identify the mechanism to display therequired 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 ApplicationsTask 2: Identify the mechanism to display therequired information. (Contd.)Result:You should use a status bar to display the relevantinformation 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 ApplicationsTask 3: Perform the appropriate steps to display theinformation.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 ApplicationsJust 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 ApplicationsSummaryIn 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 foraccessing 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 theToolBar control.The StatusBar control can be used to display relevantinformation about the application. ©NIIT Creating Menus and Working with MDI Applications/Lesson 9/Slide 36 of 36

×