O'Reilly logo

MCAD/MCSD.NET Training Guide (Exam 70-316): Developing and Implementing Windows®-Based Applications with Microsoft® Visual C#™ .NET and Microsoft® Visual Studio® .NET by MCSD Amit Kalani - MCAD

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Handling Control Events

Add controls to a Windows form.

  • Set properties on controls.

  • Load controls dynamically.

  • Write code to handle control events and add the code to a control.

Event handling for a control is very similar to event handling for a Windows form (refer to Chapter 1). Each control inherits a number of events from the System.Windows.Forms.Control class.

Each control type also has a set of events that is specific to its unique functionality. Every control has a default event associated with it (for example, the Click event for a Button control, Load for a Form control, and CheckedChanged for a CheckBox control). When you double-click a control in the Windows Forms Designer, the designer automatically creates an event handler for the default ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required