Hello Gurus...
How to create ListView on the form by using coding?
Thanks
Printable View
Hello Gurus...
How to create ListView on the form by using coding?
Thanks
Do you mean populate a ListView?
To create one, just add the component to your project, and draw the control on a form.
I want to create ListView component by using coding.
I do not want use Listview component from ToolBox
How to do it?
1. Goto Project -> {projectname} properties -> Make (tab) -> Uncheck "Remove information about unused ActiveX components".
2. Add "Microsoft Windows Common Controls 5.0"
Then use this code...
VB Code:
Dim LstView As ListView Private Sub Form_Load() Set LstView = Me.Controls.Add("COMCTL.ListViewCtrl.1", "newListView") With LstView .Left = 1000 .Top = 1000 .Width = 2000 .Height = 500 .Visible = True End With End Sub
For other controls - http://www.vbforums.com/showthread.php?t=342054
TQ Andrew G.
I got it.
Thanks again