|
-
Mar 26th, 2006, 01:03 PM
#1
Thread Starter
Member
list box with images
hi, I have list box and want to come with 32 X 32 images or logo on the list box how can I do that in visual basic!
-
Mar 26th, 2006, 01:47 PM
#2
PowerPoster
Re: list box with images
 Originally Posted by Alidad
hi, I have list box and want to come with 32 X 32 images or logo on the list box how can I do that in visual basic!
what do you mean? can you explain in more detail?
-
Mar 26th, 2006, 01:58 PM
#3
Thread Starter
Member
Re: list box with images
what i mean that when i use list box that come with list, for samele that there is list of computer in list box, (disk, mouse, monitor and computer hardware) so i want to add icon or images next to the list of those name, in the list box, how can i do that!
-
Mar 26th, 2006, 01:59 PM
#4
PowerPoster
Re: list box with images
 Originally Posted by Alidad
what i mean that when i use list box that come with list, for samele that there is list of computer in list box, (disk, mouse, monitor and computer hardware) so i want to add icon or images next to the list of those name, in the list box, how can i do that!
i dont believe the listbox supports images/icons. listview does though and other components
-
Mar 26th, 2006, 04:16 PM
#5
Thread Starter
Member
Re: list box with images
i see, do you know where i can learn more abou the listview with images/ icon!
Alidad
-
Mar 26th, 2006, 04:20 PM
#6
PowerPoster
Re: list box with images
 Originally Posted by Alidad
i see, do you know where i can learn more abou the listview with images/ icon!
Alidad
if you search the forum for posts by me, youll find what youre looking for.
-
Mar 26th, 2006, 04:30 PM
#7
Re: list box with images
You can add one to your toolbox from the "Project > Components > Controls tab > select MS Winwods Common Controls 6.0 > click OK. Then drag and drop a listview and imagelist controls to your form.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 26th, 2006, 11:05 PM
#8
Thread Starter
Member
Re: list box with images
I have tried with listview and imagelist controls, but how can i write code to make works! i tried with
listview1.listitems.add ("general", (imagelist.index = "1"))
is this is correct!
-
Mar 27th, 2006, 12:04 AM
#9
Re: list box with images
More list this.
VB Code:
Option Explicit
Private Sub Form_Load()
With ListView1
.AllowColumnReorder = False
.FullRowSelect = True
.HideSelection = False
.LabelEdit = lvwManual
.MultiSelect = False
.Sorted = False
.View = lvwReport
.ColumnHeaders.Add , , "Col1", .Width / 4
.ColumnHeaders.Add , , "Col2", .Width / 4
.ColumnHeaders.Add , , "Col3", .Width / 4
.ColumnHeaders.Add , , "Col4", .Width / 4
.Icons = ImageList1
.SmallIcons = ImageList1
.ListItems.Add , , "Item 1", , 1
.ListItems.Add , , "Item 2", , 2
.ListItems.Add , , "Item 3", , 3
.ListItems.Add , , "Item 4", , 4
.ListItems.Add , , "Item 5", , 5
End With
End Sub
Last edited by RobDog888; Mar 27th, 2006 at 12:23 AM.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 27th, 2006, 04:12 PM
#10
Thread Starter
Member
Re: list box with images
thanks so much for your help, this code is helped me to undersand, but I forgot to ask, i also added frame1 and frame2 two, if i click one of catagories in listview called "general", it will bring frame1 on the floor and hide frame2, how can i write that code!
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
|