![]() Click that arrow to view a color menu containing tabs. A drop-down arrow appears next to the property. This window allows you to set a control’s properties, such as color and size.Ĭlick the “ForeColor” property. Visual Studio places it on the form and names it “ListBox1.”Ĭlick the “ListBox1” control and press “F4” to view the Properties window. A new form named “Form1” opens in the editing window.Ĭlick the “View” button, then click “Toolbox” to open Visual Studio’s toolbox.ĭouble-click the “ListBox” control. Launch Visual Studio and create a new Visual Basic Windows Forms project. To create an enhanced ListBox that displays a selected item’s text in a different color, you have to make a small change to the ListBox’s “DrawItem” method. ![]() The ListBox control, for example, displays items in a list however, you can only change the text color of every item in the control. Visual Basic’s “DrawItem” method allows you to build imaginative controls.
0 Comments
Leave a Reply. |