Events Handling
One of the most important aspects of GUI applications is interaction with the user. Windows Forms implement it through an event-handling mechanism. We refer to applications that employ such mechanism as event-driven. In the case of a GUI, the user issues the events. He or she may move the mouse pointer over the window and click somewhere in the client area. Our task is to provide the code, which will run in response to these events and perform appropriate tasks.
Windows Forms employ the .NET event model, which uses delegates that we discussed in Chapter 13. Using delegates, we bind events to the methods that handle them. The Windows Forms classes use multicast delegates. This means that we may bind the delegate to more than one ...
Get Programming PERL in the .NET Environment 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.