Application #29. Use the ListBox and ComboBox

This sample shows you how to use the ListBox and ComboBox controls. It covers the basic functionality inherent in each control, as well as some improvements and new features available with these controls in Microsoft Visual Basic .NET.

As Figure 4-1 illustrates, the sample application consists of a single form with five tab pages. Each tab page covers a different topic related to the ListBox or ComboBox control. The Add Items tab demonstrates how to add items to a ListBox control from a list of objects. The Bind To DataTable tab populates a data table with a list of all files on the C: drive of your PC. That data table is then bound to a ListBox control. The Selection Mode tab allows you to test ...

Get 101 Microsoft® Visual Basic® .NET Applications now with O’Reilly online learning.

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