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
Would it be possible to see an example of an array program that tracks rent in different apartment buildings and is modular?

Methods: VBScript Dictionary Object Method D escription Add Method Adds a key, item pair. Exists Method

DYNAMIC LINK LIBRARY   The dynamic link library (dll) permits one copy of a function to be shared among some parallel executing programs. The dll is a file that contains a num

THE PRECOMPILED HEADER FILE As soon as you generate a blank project, ahead of doing any coding you compile the project to generate .pch (that is the pre compiled header) file a

I have all my program done except the loan part that I am having a lot of troubles with

Associating Images to Toolbars: 1. Add an Image list to your form from the tool box. 2. Pick the custom property of the image list. 3. Click the images tab. 4. Select

Dialog Based Application: The application which app wizard generates is based on the dialog template resource.

Adding Handlers With Class Wizard: Whenever a handler is added, the class wizard places the prototype for the message handler in the header (.H) file. It gives a skeleton hand

i want to print number following pattern 1 12 123 1234

ToolTip: The ToolTip property is used to flash a message regarding a control object when the mouse pointer moves over that object for a couple of seconds. Pick a control and c