COP4226, Extra Credit 4

Due Friday, November 15 (not late until 6 am 11/16)

Create a Windows Forms Application in Visual Studio. The project will handle arrow keys, implement drag and drop, and serialize data to and from a file.

Main Form

The main form will have a main menu and a multiline text box that fills the client area.

Main Menu

The main menu will have a File menu with the following items.

New
Clear the text box. Clear the file name, if the file has been saved.
Save
Serialize the file. If the file has not been saved before, then ask the user for the name of the file. If it has already been saved, then use the previous file name again.
Open
Prompt for the name of a file that has been saved by this program.
Print
Print the text from the text box.
Print Preview
Open a print preview dialog and show how the text will look when printed.
Exit
Close the application, nicely

Drag and Drop

Enable dragging and dropping.

Arrow Keys

In addition to the arrow keys moving the cursor in the text box, they should also move the location of the main form. Each arrow press should move the location of the form one pixel in the direction of the arrow.

The arrow keys can be caught in the main form, since the preview command will bubble to the parent, unless the child returns false. The text box does not return false when processing command keys.

Submitting Homework

Zip your entire project and upload it on the web. Exclude the Debug and Release directories.
Submitting Homework Online.