MCC - CIS162AD
CS10 Loops and Printing - 20 points![]()
- Create a project to maintain a list of books in a combo box.
- Use a combo box with the DropDownStyle set to DropDown for the book names.
- Initially the book list should hold these book names (add using Items.Collection):
How to Program Introduction to Programming Problem Solving and Programming Object-Oriented Programming Program Design and Data Structures- Allow users to print preview and print the book list, add book names, remove book names,
clear the book list, display a count of the number of books in the list, and display an About Form.
The options should be implemented as menu items:
File Edit Help Print Preview Add Book About Print Remove Book Exit Clear Book List Display Book Count- Begin by implementing the options listed under Edit.
- Display an error message if the user attempts to add a blank book name.
- Display an error message if the user selects delete without first selecting a book name.
- Before clearing the list, display a message box to confirm the operation.
The clear method deletes all entries from the list, so verify the user wants to do this.- Use a message box to display the count.
Sample Form: The image below shows the initial books names that are displayed when the dropdown arrow is clicked.
![]()
- Add a Windows form to use as the About Form that displays the assignment number, your name, and a OK button.
(Project > Add Windows Form, under Templates select Windows Form, and name it AboutForm.cs)
See the example CS10ex provided for the code on how to create an instance and display the form at runtime. The option to display the About Form should be listed under the Help menu item.CS10 About Form:
![]()
- Add a PrintDocument control to the component tray, and double click on it to create the shell
for the printDocument1_PrintPage method and to link the PrintPage event to the method. If the
method is not linked to the event, the Print and Print Preview will not execute the code defined
in the method.- Print Preview should display the output in a print preview dialog window.
- Print should print all of the books currently in the list.
- Both print options should execute the same PrintPage event procedure.
Include your name and a heading at the top of report.
The entire list should be printed.CS10 Print Preview:
![]()
- Submit CS10Form.cs, CS10Form.Designer.cs, AboutForm.cs, AboutForm.Designer.cs
Revised: 11/02/2011 - www.mesacc.edu/~marquez/cis162ad/cs10_loops.html