|
-
Jul 20th, 2006, 07:25 AM
#1
Thread Starter
Addicted Member
[RESOLVED] Create ListView by Code
Hello Gurus...
How to create ListView on the form by using coding?
Thanks
Last edited by g-mie; Jul 20th, 2006 at 08:52 AM.
-
Jul 20th, 2006, 07:28 AM
#2
Re: Create ListView by Code
Do you mean populate a ListView?
To create one, just add the component to your project, and draw the control on a form.
-
Jul 20th, 2006, 07:34 AM
#3
Thread Starter
Addicted Member
Re: Create ListView by Code
I want to create ListView component by using coding.
I do not want use Listview component from ToolBox
How to do it?
-
Jul 20th, 2006, 07:47 AM
#4
Re: Create ListView by Code
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
Last edited by Andrew G; Jul 20th, 2006 at 07:51 AM.
-
Jul 20th, 2006, 08:12 AM
#5
Thread Starter
Addicted Member
Re: Create ListView by Code
TQ Andrew G.
I got it.
Thanks again
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|