Professional Documents
Culture Documents
Course Slides
Course Syllabus (tentative)
Introduction: Building Windows Applications
Lecture 1 – Responding to Events
Lectures 2 – Creating Complex Applications
Dialog Boxes
Lecture 3 – Dialog Boxes (1)
Lecture 4 – Dialog Boxes (2)
Creating Menus, Debugging, and Error Handling
Lecture 5 – Creating Menus (1)
Lecture 6 – Creating Menus (2)
Lecture 7-8 – Debugging and Error Handling
Midterm Examination
Object Oriented Programming
Lecture 9 – Introduction to Objects
Lecture 10 – Inheritance
Lectures 11 – Polymorphism
Lecture 12 – Shared Class Resources
Lectures 12 – The .Net Classes
Final Examination or Submission of Final Project
Course Methodology
Lecture materials will be distributed at the beginning of each
class…
Followed by the Lecture.
Where possible, examples will be presented with figures.
Each class is 95 minutes. After each lecture-period:
students will then be provided time for practice (as time permits).
For a total of 95 minutes (lecture + practice)
Teaching Assistants (TAs) will be available to answer questions
during the practice period.
Note: substantial practice and work beyond the class period will
be required.
Course Evaluation (Grading)
The final grade (100%) will be awarded using the following
criteria for evaluation (tentative):
Attendance: 20%
Students should come to each class.
Note: points will be deducted for lateness or inappropriate behavior.
Mid-term Exam/Projects: 35%
Midterm: An In-class test
After Lecture 7
Final Examination (comprehensive test): 45%
64 MB or higher
Windows XP Compatible
CD-RW
650 or 700 MB
Floppy Disk
3.5’, 1.4 MB
The items that appear depend on the Class Name combo box selection:
Here, Form1 is selected at left…
So, names of the Libraries, Classes, etc in the current project are listed at right.
Note that:
1. Selecting the (Declarations) entry takes you to the Class top…
Where you can change the Class definition, and add members.
2. Items appear either bold (existing) or faint (not yet created).
Here, the Finalize method can automatically be created by selecting it.
We will not discuss Finalize until later...
3. Methods are denoted by a small purple square icon.
4. Libraries are denoted by an icon with 4 stacked books.
Adding more Event Handlers
Next, select btnWelcome in the Class Name combo box:
Only items related to btnWelcome now appear in the Method Name combo box:
Specifically, events are shown (icon: lightning bolt)...
Note that existing events are shown in bold (Click)
Let’s use this combo box to add 2 more event handlers to btnWelcome…
By selecting the events, MouseEnter and MouseLeave…
This creates two new, empty event handlers.
Now, add the code below to the two new event handlers:
Adding Event Handlers (Test Function)
Let’s test the function of our simple, 3-event button…
Program 2 – Char/Word Counting Tool
Let’s practice by making a second application…
A simple counting utility (tool)
Goal: Design a tool with the ability to accept input text, and:
Ability 1: Count the characters in the input Text
Using the property String.Length
And the TextBox event handler TextChanged
First, lets make the GUI and program the Char. Counting ability:
Char/Word Counting Tool (Ability 1)
First, construct the GUI and program the Character Counting ability:
We need 3 Labels (lbl), 1 TextBox (txt), 2 Radio Buttons (rad), and 1 button (btn):
Char/Word Counting Tool (Ability 2)
Again, our goal is to make a tool with two abilities:
Ability 1: Count the characters in the input Text
Using the property String.length
And the TextBox event listener TextChanged