8Event-Driven Programming

8.1 Paint Events

8.2 Drawing Shapes

8.3 Drawing Text

8.4 Using Color

8.5 Mouse and Key Events

8.6 (Optional) Solving Problems with C#: The Tangram Puzzle

Event-driven programs will respond to external events generated by the user or the operating system. In this text we introduce event-driven programming in two chapters graded according to complexity. In this chapter we cover paint, mouse, and key events. The Form can handle these events without using delegates. In Chapter 9 we cover events associated with a user interface control such as a button and introduce the delegate concept.

OBJECTIVES

images Understand the idea of ...

Get Computing with C# and the .NET Framework, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.