Class Plan for Fall 2009
If you find an error in the notes, send me an email and I will correct it. If errors have been corrected, the files will be noted below as "updated". You can also send an email if you think the notes are confusing or just can be improved. Please be specific enough that I can figure out what needs fixing.
Monday, August 24: Introduction to Visual Studio. Your first Windows program. Lab 1, Hello FCL, gives step-by-step instructions to duplicate the program in the notes.
Reading material: How Windows Works Event-driven programming; applications, windows, and messages. What messages are and how they are created and "sent". The main message loop; the application message queue. Processing messages. WinMain. The SDK (or the Win32 API) versus MFC versus .NET--three ways of writing Windows programs.
Wednesday, August 26: Introduction to Windows Graphics. The Paint event; the Graphics class; rectangles, clipping, the invalid rectangle. FillRectangle, DrawRectangle, DrawEllipse. Lab 2, Painting your window.
Monday, August 31: The Mouse. Responding to mouse clicks; hit-testing; responding to double-clicks. Lab 3, HitTest.
Wednesday, September 2: No class. Dr. Beeson will be out of the country. You will have a homework assignment.
Monday, September 7: Labor day holiday, no class.
Wednesday, September 9: Intermediate Graphics. Colors, lines and polygons, GraphicsPath and Region classes. Lab 4, Pie Chart.
The material introduced in that lab is expanded and elaborated in these notes: arcs, pies, and area fills.
Wednesday, September 16: Advanced menus. There are no lecture notes for this day; the point is simply that you can have more than one MenuStrip object in your program and enable and disable them as you like. The lab will illustrate this technique. Lab 6, Bonjour.
Monday, September 21: Practice for the midterm. You will write a program similar to the midterm exam, but it will be graded only as a lab exercise.
Wednesday, September 23: Dragging. Mouse capture; the Capture property; updating on MouseMove. Use of child windows for dragging. Conversion of coordinates from one window to another. Lab 7, Selection Rectangle
Monday, September 28: Lab 8, Dragging an image.
Wednesday, September 30: First midterm exam. You will be expected to write (without step-by-step instructions) a program that will put up a simple menu, and respond to menu choices by calling simple graphics commands, and respond to the mouse using correct hit-testing. Although you will have access to the course web site and your notes, you should not need to use precious time consulting them for these elementary tasks. These skills should be so well-practiced that you can complete such a program well within the lab time constraints.
Extra material: Introduction to printing. We can't have a lab on printing since you can't print in the lab, but you should learn how to print from a Windows program by going through this on your own.
Monday, October 5 : Controls. Purposes and uses of pushbuttons, edit boxes, static text boxes, list boxes, combo boxes, radio buttons, check boxes, spin controls, sliders. Lab, Using the Toolbox.
Push buttons . Using the form editor; handling the Click event; using the Anchor, Font, TextAlign, Image, ForeColor, and BackColor properties.
Wednesday, October 7: Modal Dialogs Definition of a modal dialog; creating a new form to serve as a dialog; setting the properties of the form correctly; adding controls; setting the properties of the controls correctly; bringing up a dialog by initializing a dialog object, calling its ShowDialog method, checking the return value, and if it is DialogResult.OK, then retrieving the data and storing the data in application member variables. Data validation is not covered in this lecture. Lab, Modal Dialogs
You should repeat the example from this class, and similar examples of your own creation, many times, until you can program a dialog box without reference to any instructions. This is considered a basic skill. Memorize the steps in the previous paragraph.
Monday, October 12: Radio Buttons and List Boxes. Creating, initializing, and responding to radio buttons. Creating and initializing a list box; adding strings to a list box; getting the current selection; deleting an item. Exchanging data between the form and a list box. Use of the C# ListArray class and the foreach construct of C#. Lab, Radio Buttons and List Boxes
Wednesday, October 14: Data validation. The Validating event and the ErrorProvider class. Lab, Error Providers.
Monday, October 19: No class, instructor furlough day.
Wednesday, October 21: Fonts Typeface, size, and style; character sets, glyphs, Ascii, Unicode; raster, stroke, and TrueType fonts; kerning; character and cell height, internal leading and external leading. Lab, Introduction to Fonts
Monday, October 26:
Wednesday, October 28: Practice for the second midterm exam.
Extra material: Toolbars and status bars.
Monday, November 2 :Second midterm programming exam.
Wednesday, November 4 :Introduction to the Windows Common Dialogs. The ColorDialog, and introduction to the OpenFileDialog and SaveFileDialog. Lab, Using the Color Dialog.
Monday, November 9 :Common File Dialogs. Details of the SaveFileDialog and OpenFileDialog classes. Disabling Save until Save As is used; filename extensions; filter strings; specifying the initial directory; overwriting files; opening non-existent files; opening network files; checking file permissions; error handling. Lab, the Save File and Open File dialogs.
Wednesday, November 11:
The following material will not be covered in 2009, due to instructor furlough days. You could, of course, study it on your own.
Network programming in .NET. Sockets. Making a connection. Server and client sockets. The TcpListener and TcpClient classes in .NET. Asynchronous programming.
Network programming in .NET continued. The TwoWayChat program is explained in the notes.
For the times of the final exams, see the green sheet.