Skip to Content
.NET Windows® Forms Custom Controls
book

.NET Windows® Forms Custom Controls

by Richard Weeks
January 2002
Intermediate to advanced
288 pages
5h 48m
English
Sams
Content preview from .NET Windows® Forms Custom Controls

The IconButton Control

Okay, time for something interesting. With the basics covered, it's time to dive in and create a simple control based on the information provided so far. The example we'll use creates a custom pushbutton that displays an icon to the left of the text. In addition to providing the C# implementation, the IconButton has also been implemented in VB .NET to show that it is possible to create the same types of controls regardless of language choice.

Choosing the base class for a custom control requires evaluating the functionality needed by the control. Because the IconButton control doesn't scroll and is not going to host other controls, the System.Windows.Forms.Control base class provides all the required functionality needed ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pro .NET 5 Custom Libraries: Implementing Custom .NET Data Types

Pro .NET 5 Custom Libraries: Implementing Custom .NET Data Types

Roger Villela
Professional C# 5.0 and .NET 4.5.1

Professional C# 5.0 and .NET 4.5.1

Christian Nagel, Jay Glynn, Morgan Skinner

Publisher Resources

ISBN: 0672323338Purchase book