O'Reilly logo

Developing Microsoft® .NET Controls with Microsoft Visual Basic® .NET by John Connell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building a Better DriveList Using Advanced Combo Box Techniques

Start a new Windows project, and name it DriveCombo. Add a combo box and an ImageList control. The ImageList control will be used to hold the bitmaps of the various drives. Figure 2-20 shows how the form should appear.

Figure 2-20. The initial design of DriveCombo

Bring up the Properties window for the combo box, and change the value of the combo box’s Name property to cbDrives. Change DropDownStyle to DropDownList. Also change DrawMode from Normal to OwnerDrawFixed, as shown in Figure 2-21. It’s important to change both of these properties or the enhanced control won’t work as ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required