The List control is used to present a list of items where thr user can click and select the items from the list.In order to add items to the list,we can use the AddItem method.
1.Start Visual Basic and pick “Standard Exe” from the list of new projects.
2. Go to the properties page (on the right) and find the caption property for the main form (Form1).
3. Add a List control to the form by clicking the List tool and then drawing on the form.
4. Double click the ListBox . This will bring up the code-view Now, double window. Type in the following code into the List1_Click() subroutine shell that’s generated for you:
5. At this point, press <F5> key to run the program and select the option to see what happens.
6. When you select red option from Listbox then form’s colour is change and show a message
TreeView Control in Visual Basic 6.0
The TreeView control display a hirearchical display node object.Each node consist of label ,optional bitmap.You ...read more
DriveListBox,DirListBox and FileListBox in Visual Basic 6.0
Three of the controls on the ToolBox let you access the computer's file system. They ...read more
Pointer Control in Visual Basic 6.0
Pointer control is used to resize and position a control. When you're drawing controls on ...read more
OLE control in Visual Basic 6.0
Insertable Objects (like the Excel Worksheet object; with a list of the employees, or a ...read more
ToolTip in Visual Basic 6.0
A tool-tip is a small box that is displayed at the mouse location when overing ...read more
Frame,Image and Picture Control in Visual Basic 6.0
A frame is an object that provide a visual an functional container for controls.it is ...read more