How to include list box control in visual basic project, Visual Basic Programming

How to Include List Box control in your project

A list box is used for representing the users with a data. You can prefer the data from the list box for data entry. No editing is possible in the list box. If you want to edit you must use a combo box control.

Illustration: A Project to describe the Use of List Box

1) Establish a new Project by choosing a File and then the New Project.

2) Suppose the project type be Standard EXE.

3) Add a list box and a text box to the form.

4) Double click on the form. And add the coding given below:

Private Sub Form_Load()

List1.AddItem "a"

List1.AddItem "b"

List1.AddItem "c"

List1.AddItem "d"

End Sub

This will generate a list box as shown in the figure with the contents a, b, c & d.

5) Relate the click event with the list box

Private Sub List1_Click()

Text1.Text = List1.Text

End Sub

Whenever an item is clicked in the list box, the contents will be transferred to the Text Box.

2321_combo box.png

Figure: A Form with Combo Box Control

Posted Date: 10/9/2012 8:06:51 AM | Location : United States







Related Discussions:- How to include list box control in visual basic project, Assignment Help, Ask Question on How to include list box control in visual basic project, Get Answer, Expert's Help, How to include list box control in visual basic project Discussions

Write discussion on How to include list box control in visual basic project
Your posts are moderated
Related Questions
PROJECT TO CREATE SPLITTER WINDOW   1. Generate the SDI application. 2. Enlarge the class tab page. 3. Select the view class. 4. On right clicking the menu pops up.

While several operations take place in an expression, each part is evaluated & resolved in a predetermined order called operator precedence. You can employ parentheses to override

Mostly time, you just desire to assign a single value to a variable you have declared. A variable having a single value is a scalar variable. At other times, this is convenient to


Enabling ODBC: 1. Select the control panel, programs, setting and then ODBC32 2. Double click on the ODBC32 3. The Settings for an operating system will take place. 4

Accelerators: The Accelerators are short cut keys. The Accelerators are formed by placing an ampersand before any of the characters of the Caption. As a product the letter fol

ILLUSTRATION OF MDI APPLICATION USING A PROJECT 1. Choose the MDI option while generating the project by using the Appwizard. 2. Add the WM_LBUTTONDOWN message for the view

Check Box: The check box control takes the value as on or off or grayed. The grayed one is neither on nor off. The user can transform the setting of the grayed check box.

( Wage Calculator with Tax Calculations) Develop an application that calculates an employee’s earnings, as shown in Fig. 4.23. The user should provide the hourly wage and number of

INTRINSIC CONTROLS   The Intrinsic controls are the built-in controls. Few of the controls are Combo box, Check box, Command Button, Label etc. The controls have properties re