O'Reilly logo

Developing Microsoft® .NET Controls with Microsoft Visual Basic® .NET by John Connell

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

Type Converters

Building Windows Forms and Web Forms controls is fairly straightforward. Remember that your audience is programmers and not end users. For controls to be easy to use and sufficiently generic, you need to provide properties (via the property editor dialog box) that are self-evident.

We’ve been adding properties of type Boolean and String. As discussed, all properties rendered in a property’s value box are of type String. However, if you need to display a property of, say, type color or date or image, the designer has built-in type editors that convert colors to strings and vice versa. These type editors are known generically as type converters and are inherited directly from System.Object.

A type converter converts a given data ...

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