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
I need a VB6 software for making a soccerboard for 10 teams & automatically generate their fixtures

Create the flowcharts using MS Visio, MS Excel or MS Word to demonstrate the algorithm. Submit your flowchart under the assignment for CH7-4-26 Flowchart. Part Printouts H

VBScript Operators VBScript contain a full range of operators, including comparison operators, arithmetic operators, concatenation operators, and logical operators.

Using Visual Studio 2010 C++ 1) Using Windows Explorer, make a copy of Irvine\examples\Project_sample folder in the folder where you keep your materials for this course.

Coding conventions are recommended that may help you write code via Microsoft Visual Basic Scripting Edition. Coding conventions can include the given: Naming conventions for ob

Visual Basic 1. What is the method of creating a new project in VB.SSS 2. Illustrate Code Editor Window and Solution Explorer. 3. Write a VB program to sort and display a

You declare variables explicitly in script via the Dim statement, the Public statement, & the Private statement. For illustration: Dim DegreesFahrenheit You declare multiple

Input Box: To demonstrate the use of the Input Box as shown in figure. Now consider the illustration shown below: 1. Initiate a new project 2. Select the standard exe

what are the functions and the importance of hierarchy operators

This section will discuss the fundamentals of VBScript and define concepts such as datatypes, loops and others. VBScript Data Types VBScript contain only one data type called