Hour 4. Understanding Events

   

Hour 4. Understanding Events

It's fairly easy to create an attractive interface for an application using C#'s integrated design tools. You can create beautiful forms that have buttons to click, text boxes in which to type information, picture boxes in which to view pictures, and many other creative and attractive elements with which users can interact. However, this is just the start of producing a C# program. In addition to designing an interface, you have to empower your program to perform actions in response to how a user interacts with the program and how Windows interacts with the program. This is accomplished by using events. In the previous hour, you learned about objects and their members ”notably, properties and methods . In this hour, you'll learn about object events and event-driven programming, and you'll learn how to use events to make your applications responsive .

The highlights of this hour include the following:

  • Understanding event-driven programming

  • Triggering events

  • Avoiding recursive events

  • Accessing an object's events

  • Working with event parameters

  • Creating event handlers

  • Dealing with orphaned events


   
Top


Sams Teach Yourself C# in 24 Hours
Sams Teach Yourself Visual Basic 2010 in 24 Hours Complete Starter Kit (Sams Teach Yourself -- Hours)
ISBN: 0672331136
EAN: 2147483647
Year: 2002
Pages: 253
Authors: James Foxall

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net