Chapter 20. Visual Basic .NET Controls

You will learn about the following in this chapter:

  • Visual Basic .NET controls

  • The Form control

  • The commonly used properties of the Form control

  • The commonly used methods of controls

  • Combo box controls

One reason Visual Basic .NET is so popular as a Windows programming language has to do with the controls that come with it. The Visual Basic .NET controls are objects that have built-in functionality that you do not have to write yourself. You can write some very useful programs by just combining Visual Basic .NET controls together, without having to write much code. Therefore, new Visual Basic .NET programmers become productive very quickly compared to new programmers working with other Windows programming languages.

Visual Basic .NET has more than three dozen Windows Form controls, and each has dozens of properties and methods associated with it. This chapter discusses the various properties and methods of some of those controls ”those that you will most likely use in your programming. Other Visual Basic .NET controls are discussed in the chapters where they are used. For example, the OpenFileDialog control is discussed in Chapter 23, "Disk Data Files," and the DataGrid tool is discussed in Chapter 25, "Database Programming with Visual Basic .NET."

There are some control properties I have never used in more than 10 years of using Visual Basic. If you think you need to use a property that is not covered in this book, chances are very good that the Visual Basic .NET online help facilities address your questions. Using the online help to answer your own questions is part of the learning process. To paraphrase an old saying, this chapter gives you a fish for today, but the online help teaches you how to fish on your own.

This chapter groups the control properties together to simplify their discussion. That is, rather than discuss the Text property of the TextBox control and then, later in the chapter, discuss the Label control's Text property, common properties are discussed together. This chapter discusses the methods of the various controls in the same fashion.

Programmer's Tip


Technically, there is a difference between a Visual Basic .NET component and a Visual Basic .NET control. A Visual Basic .NET component must implement the Icomponent interface for the object. A Visual Basic .NET control is a component that is visible at runtime. At this point, however, we can use these terms interchangeably.

Visual Basic .NET. Primer Plus
Visual Basic .NET Primer Plus
ISBN: 0672324857
EAN: 2147483647
Year: 2003
Pages: 238
Authors: Jack Purdum

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: