Wednesday, April 11, 2018

Learn How to Find and Add ListView in Toolbox in VB 6.0 tips

Learn How to Find and Add ListView in Toolbox in VB 6.0 tips

The ListView control is easy and advanced listing data in multiple columns and rows. This contain many advance features like : Grid lines, Label Edit, View Type, Full Row Select, Hover Selection etc. Its provide fast scrolling process to data view. You can easily fill data from database or you can add data dynamically during run time.
So, following process describe the tips to find and Add ListVIew in ToolBox in VB6.0.
But, where to find and add ListView in Toolbox?
 Step 1: Find and Add ListView Control
To add this control or any external control, Just browse or choose ".ocx" for VB project and for further understand follow the steps:

Steps: Project (Menu) >> Components (Window) >> Controls (Tab) >> Chose Component

First, find and go to "Project" menu and click on it. Find "Components" option from "Project" menu and click on it. "Components" window will appear. You can also press (Ctrl + T) from keyboard to open this window.
This window contain 3 Tabs (Controls, Designers, Insertable Objects). Find "Microsoft Windows Common Control 6.0(SP6)" from "Controls" tab and check it. Then click on "OK" or "Apply" button.
Add Controls for add Listview in toolbox
Add Controls
After that, this component will add many control list to Toolbox.
Controls list of "MSWC Control 6.0(SP6)":
 Tabstrip vb6 skotechlearn
TabStrip
Toolbar vb6 skotechlearn
Toolbar
Statusbar vb6 skotechlearn
StatusBar
ProgressBar vb6 skotechlearn
 ProgressBar
TreeView vb6 skotechlearn
TreeView
ListView vb6 skotechlearn
ListView
ImageList vb6 skotechlearn
ImageList
Slider vb6 skotechlearn
Slider
Imagecombo vb6 skotechlearn
ImageCombo
 Step 2: Drag or Add control to Form
For attach this control to Project’s Form, click on this icon from ToolBox. And draw it to Form1 like bellow.
Drag or Add Listview in Form
Drag control in Form
You can use this control to display a list of data in the form of a table and also include icons at the side. This control will show the collection of items or data that can be display in different views type through its related settings, such as LargeIcon, Details , SmallIcon, List and Tile. 
You can add more than one header in this control.
 Step 3: Add Column Header
Right click on this control and select "Properties" option and click on it. A "Property Pages" box will open. This box contain 7 Tabs (General, Image Lists, Sorting, Column Headers, Color, Font, Picture). Go to "Column Header" tab, and press "Insert Column" button.This will enable related settings (Like: Index, Text, Alignment, Width etc). Type header name in "Text" input box and again press "Insert Column" button for adding more header according to need.

Adjust column width by giving range of width value "Width" controls. After completion of this control's settings, press "OK" button.
Steps:
ListView (Right Click) >> Properties >> Column Header (Tab)>> Insert Column (Click)
Column Header Setting In ListView control
Column Header Setting
  • Index: Describe the Header number
  • Text: Input of header name
  • Alignment: Set Alignment (Left, Center, Right)
  • Width: Increase or decrease width by giving width Value.
  • Key: Type header key value.
  • Tag: Tag header by giving value.
  • Icon Index: Define icon index number.
This way you can add Listview control to form for further process and its features or properties in Visual Basic 6.0 with SKOTechLearn.

0 comments: