Chapter 14

Creating Windows Forms User Controls

What You Will Learn in this Chapter

  • What a Windows Forms Control is and how it works
  • How to create and use a Windows Forms Control
  • How to add methods and events to your control
  • How to code for design time and runtime

Wrox.com Code Downloads for this Chapter

The wrox.com code downloads for this chapter are found at www.wrox.com/remtitle.cgi?isbn=1118311813 on the Download Code tab. The code is in the 311813 C14.zip download and individually named according to the names given throughout the chapter.

In this book, you have used many of the controls that come with the .NET Framework, from the Button and the TextBox controls to the ListBox control. You may even have used some of the more advanced controls such as the DataGrid and the TreeView. Although at first some of them may be hard to use, they offer a lot of functionality. These controls make it easy to create a user interface in your applications. Once you get to know how to use all their features, you will find that creating user interfaces also becomes a faster experience.

Another important aspect that makes controls so useful is that they are reusable. You can drag and drop a Button control onto any form in any new Windows project, and it works as a button should. The reuse factor is an important reason why Visual Basic, in general, became one of the most popular and is one of the most powerful development languages in use today. Did you know that you owe much of what you experience ...

Get Beginning Visual Basic 2012 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.