Professional VB 2005 with .NET 3.0 (Programmer to Programmer)

This chapter discussed how to create custom controls in VB.NET, and illustrated how much easier it is to do this compared with previous versions of Visual Basic. The advent of full inheritance capabilities in VB.NET means that it is a lot easier for developers to utilize functionality simply by inheriting from the namespaces built into the .NET Framework. It is probably best to start by overriding these existing controls in order to learn the basics of creating properties and coordinating them with the designer, building controls and testing them, and so on. These techniques can then be extended by the creation of composite controls, as illustrated by the examples within the chapter.

You have learned how to create controls in the following ways:

In the course of writing a control from scratch, it was necessary to discuss the basics of GDI+, but if you are going to do extensive work with GDI+, you will need to seek out additional resources to aid in that effort.

The key concept that you should take away from this chapter is that Windows Forms controls are a great way both to package functionality that will be reused across many forms and to create more dynamic, responsive user interfaces much more quickly with much less code.

Категории