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

Displaying Variable-Size Images in a Combo Box

Before concluding the ComboBox tour, let’s see what it takes to add some variable-size images. For some reason, I have a pathological dislike of variable-size images in a control. I think it makes the application look amateurish. But nonetheless, let’s build one and you can judge for yourself. You’ll build a combo box with three different images, each with different width and height. I just searched my hard drive and found three .bmps and added them as shown in Figure 2-28.

Figure 2-28. Variable-size images in a ComboBox control

The first thing you have to do is set the DrawMode property of the ...

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