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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.