Creating Your Own Controls

The goal in creating your own custom control is to combine the necessary graphics and/or control elements to create a unique user interface element that performs a specific purpose. It is totally up to you how you want your control to look and function. To walk you through creating a custom control, we are going to create a control whose purpose is to edit a person's address. We could choose to just add a bunch of TextBoxes to a form in an application; however, the benefit of creating a control is that it can be used again and again in many different projects.

To create a custom control, you first need to create a new project. However, the type of project you need to create is a “Windows Control Library” project. You ...

Get Visual Basic® .NET by Example now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.