Writing the Code Behind an Interface

The graphical interface for your Picture Viewer program is now finished, so click the pushpin in the title bar of the toolbox to close it (if you pinned it to begin with). Now, you have to write code so that the program will be capable of performing actions and responding to user interaction. Visual C# .NET is an event-driven language, which means that code is executed in response to events. These events may come from users (for example, a user clicking a button), or from Windows itself (see Hour 4, “Understanding Events,” for a complete explanation of events). Currently, your application looks nice but it won't do a darn thing (sort of like me on Saturday mornings—before kids). The user can click the Select ...

Get Sams Teach Yourself Microsoft® Visual C#™ .NET in 24 Hours 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.