Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Listview Icons


i have this code to put as icon in my listview


Code:
ListView1.ListItems.Add() = Text1.Text
ListView1.Icons = ImageList1.ListItems
but it doesn't work.Because is the first time i use this property i don't know nothing so i want help as much as you can




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Loading TreeView And Listview Icons From A Specified Folders Or Files Icons.
Hello,

I am creating a treeview app that looks like windows explorer. Problem is that I do not know how to get the Treeview + Listview icons from the folder or file items being loaded.


Can anyboby help please................................


Thanks

vbBoy.

Loading TreeView And Listview Icons From A Specified Folders Or Files Icons.
Hello,

I am creating a treeview app that looks like windows explorer. Problem is that I do not know how to get the Treeview + Listview icons from the folder or file items being loaded.


Can anyboby help please................................


Thanks

vbBoy.

Listview - Icons
hello folks,

for my latest project I am working on iw ould like to have a listview (reportstyle) with several items in it. For a more "spreadsheet-like-look" I have the gridlines on.

What I would like to do now is to indicate with an icon what item the user selected. So when the user clicks an item a little arrow-like icon appears before in front of the selected line and the icon disappears on the item that was previously selected.

I was thinking to first remove all the markers and then place a marker on the selected item (this because I don't know a method to check the previously selected Item)

for code I have this:

Code:
Private Sub lsvContracts_Click()
Dim NrOfItems As Integer

'remove marker from previous selected item
NrOfItems = lsvContracts.ListItems.Count

For i = 1 To NrOfItems
lsvContracts.ListItems(i).SmallIcon = 0 'no marker should displayed
Next i

lsvContracts.Refresh

'put marker before selected Item
lsvContracts.SelectedItem.SmallIcon = 2
End Sub
this just doesn't seem to be working, I just don't know what to do next.

Does anybody have an Idea how to solve this!!

Listview Icons
I have icons on a listview but I cant get them to line up beside the listitems :

code:





ListView1.View = lvwReport
ListView1.ColumnHeaders.Add , , "Total Users"
ListView1.ColumnHeaders.Add , , "Members"

For UserLoop = LBound(Usernames) To UBound(Usernames)
Set itmX = ListView1.ListItems.Add(, , Usernames(UserLoop))
ListView1.ListItems.Add , , LivveIcon, , 1
Set itmX = Nothing
Next









Can someone plz help?

Icons In Listview
how can i add an icon in a listview. I've searched the forum already and i have to set the imagelist first in the properties, but they are all empty and i dont know how to add something in it. So can anyone help me with this please, how to put the icons in it, and what to do next from there.

Listview Icons
Hi Everyone,

I have a list view box and I would like to place an Icon on each line.

The list view has subitems so it needs to be viewed in the Report View format.

Any ideas?
BDS

>>> ListView And Icons <<<
Hello, all together!
My problem is that:
When I select an entry with an icon of a ListItem control, the icon is/was selected, too. How can I avoid now, that the icon is selected?



Thanks for Help, Marco.

ListView Icons
I'm displaying different types of data in a ListView control. Some data types have icons, some do not. All the data with icons are displayed together and all the data without icons are displayed together after the Listview has been cleared. After displaying data with icons, when data is displayed without icons the text stays shifted to the right as if there was still an icon there. Is there a way to move the text back to the left when no icon is displayed? I've tried setting the view to lvwReport or lvwList and refreshing the ListView control but it hasn't worked. Thanks for the help!

ListView + Icons
Hello, it's me again

I have a ListView control returning a transaction history, with succeeded transactions, transaction warnings and transaction errors. Right now, it's just plain text. I would like to put an icon in front of each line, depending on the type off message (Suc., Warn., Err.). Can I do this in my ListView or would you replace it with a grid ?

Greetz,
Yoda

<font color=green>Do or do not
There is no try</font color=green>

ListView Icons
I've added little up and down arrows to indicate how my listview is sorted. What's bugging me is that I cant figure out how to tell a columnheader object that it is to have no icon: i.e. the listview is sorted by another column. How do I de-select an icon in this instance?

Thanks.

ListView Icons
Hello!

I was wondering if it is possible to add images to a ListView controls without needing an ImageList control.

I am re-writing a program which connects to Amazon and downloads CD/DVD covers. If the user enters an unspecific keyword like "Pink Floyd" for example, a lot of images will be returned in the XML file Amazon provides because there are a lot of CDs and DVDs made by Pink Floyd. Let's say 200 images are available. At the moment, the program operates in the following way:
Connect to Amazon and pass subscription ID, keywords, media type...Fetch the "index" XML file Amazon generated and obtain the total number of pages.Loop though all pages and for each page, loop trough the items and look if an image is available. If an image is available, store the URL in an array.Terminate the connection.If the image URL array is not empty, loop through the array and download all files. After each image was downloaded, load it into the ImageList control.After the ImageList control is full of images, start another loop which adds items to the ListView and connect the ImageList with the ListView so the images appear as thumbnails.As you can see, there are a lot of loops there. While the loops in step 3 cannot be avoided (since I have to loop through all pages and all items of the individual pages), I was wondering if I can somehow avoid the other loops by directly adding an item to the ListView and load an image from the disk (rather than from an ImageList).

Any idea if this is possible?

Regards,
Sebastian

ListView With Icons
Hi

I have a noobi question... how to add icons inside a listview's?

Help - Icons In A Listview
Hey,
I need some help with this. Made a search here in the forum but still can't figure it out.
The Listview View property is Report and I would like to add items to a listview with an icon next to each item. The icon is the same for all items.
The ImageList already holds the Icon. I get error Invalid Key


Code:
.listFiles.ListItems.Add , , FileName, , .ImageList1.ListImages.Item(1)

Thanks

ListView Icons...
How can I get an icon/picture to appear in the listview column header, to the RIGHT of the caption?

At the moment, they are all going to the left, which I don't like...

Listview Icons
I have icons on a listview but I cant get them to line up beside the listitems :


Code:

ListView1.View = lvwReport
ListView1.ColumnHeaders.Add , , "Total Users"
ListView1.ColumnHeaders.Add , , "Members"

For UserLoop = LBound(Usernames) To UBound(Usernames)
Set itmX = ListView1.ListItems.Add(, , Usernames(UserLoop))
ListView1.ListItems.Add , , LivveIcon, , 1
Set itmX = Nothing
Next



Can someone plz help?

Listview Icons...
Yeah so I have a listview. Whenever a certain action is fired I want it to add icons to it right? Well I want it to add and Icon for the ping. When lets say someone joines the channel, it gets their ping.
But whenever it adds it to the listview, it will ALWAYS come out the icon number 21. Also, when I view all of the icons, they sometimes appear all jumbled up and weird looking. Like icons all over the place? Here Is my full code for this action.

VB Code:
Private Sub ee_OnUser(Username As String, Flags As Byte, Message As String, Ping As Integer)main.lchannel.Caption = ""main.lchannel.Caption = main.ee.CurrentChannelDim IconNumber As IntegerDim PingNumber As IntegerDim strRealProduct As StringIf Ping <= 99 ThenPingNumber = 16End IfIf Ping <= 199 ThenPingNumber = 17End IfIf Ping <= 299 ThenPingNumber = 18End IfIf Ping <= 399 ThenPingNumber = 19End IfIf Ping <= 499 ThenPingNumber = 20End IfIf Ping <= 600 ThenPingNumber = 21End IfIf Ping >= 600 ThenPingNumber = 21End If'ignore this stuff it worksIf ReverseString(Left(Message, 4)) = "blaah" ThenIconNumber = 10strRealProduct = "blaah"ElseIf ReverseString(Left(Message, 4)) = "blaah" ThenIconNumber = 7strRealProduct = "blaah"ElseIf ReverseString(Left(Message, 4)) = "blaah" ThenIconNumber = 11strRealProduct = "blaah"ElseIf ReverseString(Left(Message, 4)) = "blaah" ThenIconNumber = 6strRealProduct = "blaah"ElseIf ReverseString(Left(Message, 4)) = "blaah" ThenIconNumber = 14strRealProduct = "blaah"ElseIf ReverseString(Left(Message, 4)) = "blaah" ThenIconNumber = 62strRealProduct = "blaah"ElseIf ReverseString(Left(Message, 4)) = "blaah" ThenIconNumber = 2strRealProduct = "blaah"ElseIconNumber = 64End IfIf Flags = 2 ThenIconNumber = 1End IfIf Flags = 18 ThenIconNumber = 1End IfIf Flags = 16 ThenPingNumber = 22End If'stop ignoringIf main.lchannel.Caption = main.ee.Home Thenmain.lpeople.Caption = main.lvchannel.ListItems.Count + 1AddChat vbCyan, Username, vbRed, " is in " + main.ee.CurrentChannel + " with ", vbCyan, Flags, vbRed, " flags, ", vbCyan, Ping, vbRed, " ping, using, ", vbCyan, strRealProduct, vbRed, "." If IconNumber = 1 Thenmain.lvchannel.ListItems.Add 1, , Username, , IconNumbermain.lvchannel.SelectedItem.ListSubItems.Add , , , PingNumber ElseIf Username = main.ee.Username Thenmain.lvchannel.ForeColor = &H80000004main.lvchannel.ListItems.Add , , Username, , IconNumbermain.lvchannel.SelectedItem.ListSubItems.Add , , , PingNumbermain.lvchannel.ForeColor = &HFFFF& Else With main.lvchannel.ListItems.Add(, , Username, , IconNumber).ListSubItems.Add , , , PingNumberEnd WithEnd IfEnd If End Sub

I know for a fact that my icon code numbers are right in the ImageList. Thanks for your help.

Big Icons In Listview
Hey guys!

I am having a bad time with listview.

I can put data inside of list view without trouble.

I created an imagelist and I put 2 icons inside of it, and I made the listview get both images from imagelist and show beside of the name of each column ( I have 2). The problem are 2:

1- The icons are very very big beside the name of each column

2- Each registry in the list view are receiving an icon too....And I dont want... =-(

Here is my code


VB Code:
Private Sub ConfiguraLv()Set ListView1.ColumnHeaderIcons = ImageList1Set ListView1.Icons = ImageList1Set ListView1.SmallIcons = ImageList1Dim clmx As ColumnHeaderSet clmx = ListView1.ColumnHeaders.Add(, , "column 1", , , 1)Set clmx = ListView1.ColumnHeaders.Add(, , "column 2", , , 2)Dim itmx As ListItemSet itmx = ListView1.ListItems.Add(, , "data1(0)", , 1)itmx.SubItems(1) = "data1(1)"End Sub


Thanks for your time,

Elminster

Icons And Listview
Hi there,

I am able to fill a listview and show an icon on each listitem.

Now I want to show a different icon when the user selects a particular listitem in the listview.

Does anybody know how to do this?


Many thanx!

Listview Icons
I am using a listview for the data i retrieve from my sql server.

When i retrieve the information i want to give every brand there own logo(icon).

So for example: when i retrieve 'NIKE', the listview have to put the nike icon from my imagelist in the listview. But what if i retrieve 2 different brands like 'NIKE' and 'ADIDAS', how can i give them the good icons?

this is my current code:


VB Code:
While Not rs.EOF         Set itmX = lv.ListItems.Add(, , "" & rs(0), , 3)         itmX.SubItems(1) = "" & rs(1)         rs.MoveNextWend

Icons In ListView
Hi
I have a listview with 3 columns in it. column1 holds a name, column2 holds a phone number, column3 holds a subject. I want to put an icon next to the subject in column3. How is this done?
Thanking you in advance
PORRASTAR

Listview Icons
Is it possible to add my own icons in a listview?
Also, can I change a particular row's icon? As in, can I be specific in a listview? Coz i'm afraid that if i change an icon, the whole listview will have that icon.

Also, if so, how do I refer to a specific row? All i know now is referring to a specific column, like '.subitem(1)'.

Anybody can help me out?

Listview Icons
two questions

1. i've created an app that lets a user drag items from a treeview into a listview (style is lvwIcon). however, if the text of the item that's dragged is quite long, then it overlaps other items in the listview. is there anyway to prevent that?

2. this isn't very important, but if the user drags the items in the listview over to the edges of the listview, it starts scrolling. is there any way to prevent that also?

ListView Icons
I want to load in the contents of the Desktop into a listview control. I also want the items to have the same icon that they have on the desktop. How can I do this? I don't want to use FSO so I use a File box and loop through the files. I tried the ExtractIcon API but it didn't work on files and the like.

Thanks for any help
-Joey

ListView Icons
Hi,

How can i show the standard icons of files on my pc, next to it's name in a listview?

For example if the files in the listview are:

Book1.xls
Doc1.doc
Stuff.pdf

How can i show the excel document icon nect to Book1.xls, and the word document icon next to Doc1.doc and the PDF icon next to Stuff.pdf?

Listview Icons
Hi all

Why is it that when i use an icon straight from an imagelist into a listview the icon is clear to see, as it was meant to be, but when i extract an icon from a file(exe) to a picturebox and the copy it to the imagelist, and then to the listview it looks distorted.

Does anyone know how to fix this, or have any code that will extract an icon from a file straight to an image list.

Thanks

Mark

ListView Icons
Until now, my form was working fine. There is a form I
have called frmUserList. It has a listview control
which displays a list of users in the Icon view with
small icons. Until now for the last 2 months it has
been working fine, I got a designer to make new images
for the GUI of the whole application and now its
suddenly giving me an error. Here's the code from the
load event of the form frmUserList.



Private Sub Form_Load()

Call FillUserListView
gSelectedUserName = vbNullString
CenterForm Me

End Sub



Public Sub FillUserListView()



Dim rs As Recordset
Dim StrUserName As String



With lstvwUsers
.ListItems.Clear
.View = lvwIcon
.HideSelection = False
.SortKey = 0
.SortOrder = lvwAscending
.Sorted = True

Set .Icons = MDI.imglst

Set rs = PMData.GetData("select [User Profile -
Current Status].* from [User Profile - Current
Status]")
If rs.RecordCount = 0 Then
If rs.State <> adStateClosed Then rs.Close
If Not rs Is Nothing Then Set rs = Nothing
Exit Sub
End If

Do
StrUserName = rs("User Name")
.ListItems.Add , StrUserName, StrUserName, ,
"imgUser"
rs.MoveNext
Loop Until rs.EOF

If rs.State <> adStateClosed Then rs.Close
If Not rs Is Nothing Then Set rs = Nothing
End With

End Sub



Now that I've made some changes to the GUI as in
removed all the previous pics and added new ones and
changed all forms, I get this error.

"ImageList must be initialized before it can be used"

Please don't tell me I have to set the ImageList for
each type at design time. It's been working fine till
now until before I got this error.



Regards,
Sathyaish Chakravarthy.

ICons In Listview
Hello
How can i get file-type Icons into a listview ?
I can get the filetype Icon but i cannot put it into the listview.

ListView With Icons
Good Morning

Say you have a Table like This:
EMPLOYEES
Name       text 50 chars
Surname    text 50 chars
Photo      ole
I would like to use the listview to show a list of the employees as follows:
Photo      Surname        Name

I have coded as:
Dim db              As Database
Dim rs              As Recordset
Dim strSQL          As String
Dim ItmX            As ListItem
Set db = OpenDatabase("DATABASE.MDB")
strSQL = "SELECT * FROM EMPLOYEES       
Set rs = db.OpenRecordset(strSQL,dbOpenForwardOnly)              
Do Until rs.EOF
   Set ItmX = ListView1.ListItems.Add(, , rs!PHOTO)
        ItmX.SubItems(1) = rs!NAME
        ItmX.SubItems(2) = rs!SURNAME
   rs.MoveNext
Loop
I would like the photo appears in the list as an icon.
But of course id doesn't work.
Have you got an idea about?
Thanks for yr help.
Regards
TdP

Icons For Listview
I have a list box that I fill with files from a filebox.
This part I am able to do,
the part i have trouble with is getting the icon to go with these files.
Specificly i want the icon associated with their filetype.
How can I add icons to the imagelist during runtime?
Or do i do it a different way?
thanks
jollygreengiant

ps. where can i find the icons associated with explorer
i.e. open folder, desktop icon, my computer icon etc.
I found the 32x32 icons for these in shell32.dll,
but the 16x16 version, the one i would use in my list/treeviews are
butt ugly and messed up
Where are the one that explorer uses stored?
thanks again,
jollygrengiant



Edited by - JollyGreenGiant on 11/14/2003 7:10:54 AM

ListView Icons?
Is there a way to access the icons of a listview from the Icons property? It would seem only obvious, but trying to do something like:

Dim oImage as ListImage
Set oImage = myListView.Icons(1)

...causes an error (object doesn't support this property). There is an image list control associated to the list view. I hope I don't have to access the image list for the icon. For example with a treeview control you can do:

Dim oImage as ListImage
Set oImage = myTreeView.ImageList.ListImages(1)

It doesn't look like the ListView lets you access the images like this. It's nice in procedures where I'm passing in the listview or treeview as an argument because I don't have to pass in the imagelist also.

Listview Icons
I need the icons to be displayed with the file names. I need the icons to be the ones that are associated with the file type (.txt files have Text File icons). This code displays the list of files (List1, and ListView1):


Code:

Option Explicit

Private Sub Command1_Click()
' add a Reference to Microsoft Scripting Runtime
Dim fso As New FileSystemObject
Dim objFolder As Folder
Dim objFile As File
Dim xItem As ListItem
Dim intX As Integer
Dim objSize
For intX = 0 To List1.ListCount - 1
'check to see if dir exists
If (GetAttr(List1.List(intX)) And vbDirectory) = vbDirectory Then ' this is a directory
' the folder to verify
Dim strFolderName As String
strFolderName = List1.List(intX)
' get that folder
Set objFolder = fso.GetFolder(strFolderName)
' loop thru all the files in the folder and add to listview
For Each objFile In objFolder.Files
Set xItem = ListView1.ListItems.Add
xItem.Text = objFile.Name
objSize = objFile.Size / 1024
' round up to the next KB
objSize = Int(objSize) + Abs(CBool(objSize - Int(objSize)))
xItem.SubItems(1) = Format$(objSize, "#,##0 KB")
xItem.SubItems(2) = Format(objFile.DateLastModified, "dd/mm/yyyy h:mm ampm")
xItem.SubItems(3) = objFile.Type
xItem.SubItems(4) = objFile.ParentFolder
Next
'Destroy the objects
Set xItem = Nothing
Set objFile = Nothing
Set objFolder = Nothing
Set fso = Nothing
End If
Next intX
End Sub

Private Sub Form_Load()
List1.AddItem "C:"
End Sub


Tell me if I need to explain anymore.

Listview Icons
I have 2 problems:
1. i know how to load the real icon name with api, but i want to insert it to
a listview that show the hard-drive, how do i do that?
2. i'm also want to know how can i load the right button menu that appearce
when i click on the right mouse button on a item in explorer.
that there write world like: add to zip, open, browse, properties and etc...

ListView Icons
Until now, my form was working fine. There is a form I have called frmUserList. It has a listview control which displays a list of users in the Icon view with small icons. Until now for the last 2 months it has been working fine, I got a designer to make new images for the GUI of the whole application and now its suddenly giving me an error. Here's the code from the load event of the form frmUserList.





Code:


Private Sub Form_Load()

Call FillUserListView
gSelectedUserName = vbNullString
CenterForm Me

End Sub




Public Sub FillUserListView()


Dim rs As Recordset
Dim StrUserName As String


With lstvwUsers
.ListItems.Clear
.View = lvwIcon
.HideSelection = False
.SortKey = 0
.SortOrder = lvwAscending
.Sorted = True

Set .Icons = MDI.imglst

Set rs = PMData.GetData("select [User Profile - Current Status].* from [User Profile - Current Status]")
If rs.RecordCount = 0 Then
If rs.State <> adStateClosed Then rs.Close
If Not rs Is Nothing Then Set rs = Nothing
Exit Sub
End If

Do
StrUserName = rs("User Name")
.ListItems.Add , StrUserName, StrUserName, , "imgUser"
rs.MoveNext
Loop Until rs.EOF

If rs.State <> adStateClosed Then rs.Close
If Not rs Is Nothing Then Set rs = Nothing
End With

End Sub


Now that I've made some changes to the GUI as in removed all the previous pics and added new ones and changed all forms, I get this error.

"ImageList must be initialized before it can be used"

Please don't tell me I have to set the ImageList for each type at design time. It's been working fine till now until before I got this error.

Icons Issue Using Listview
Hi guys, this is my prob:
I cannot show the ListItems icons of my listview, in report view
they are shown right in incons view but in report i just get a blank space where the icons are suppose to be

i tried very different icons (size and res) and always get the same issue, i don't know maybe i'm skipping something

any clue?
http://img63.imageshack.us/img63/1644/sinttulo28sa.gif

thx for reading

/sorry my poor english

Changing Listview Icons
Hi,
I realize thi smay be a newby type question however i need some help.

I have a listview that uses an imagelist (with images 1 thru 8 in it).
I populate the list with
Me.listview1.ListItems.Add(, loc, sTemp, , 6) (wehere 6 is the image key from the list).

I also have a number of subitems for each list item

I now do some processing and if an error comes up with the particular item (ie reading) I want to change the icon to image 8.

How do I do that. Thanks in advance
Tonez

Listview And Overlapping Icons
Hi, I've noticed when using a ListView in Report mode, when you change an icon without refreshing, the new icon overlaps the old one. Of course, it goes away when you click on the item because it's a glitch... But is there any way to purposefully overlap icons and make them stay there? Something like a little BRB tag on a user's icon for IM programs.

ListBox / Listview Icons
Hello!

I use Listbox and now Listview to show information in the userform.
Can I insert Icons in Listview (or listbox if possible) in a Excel Form.
I insert the imagelist object with icons load, but when I try to associate the object with the listview, I combos don't apear any object to select !

What I have to do ?

File Icons In Listview
I'm making a little ftp client, and I have an iconview listview to list the files on the server.. I need it to show the icon associated to the file added. I saw a post like this before but couldn't find it.. Any ideas?

ListView/TreeView Icons???
I have made my own chat client with both text and voice, it works pretty good with no bugs as of yet, but it does not have alot of features, this is only my second program made with VB6 so its all really new to me, right now I have my chatters list as ChatList but was told I needed to change it to ListView or TreeView to be able to link it to a ImagineList for user status IE cam, Voice, etc. I have no clue where to start with this is there any code examples anywhere I could see how this is done. Also I want too be able to view nicknames instead of user names any ideas there. this program is yahoo chat based if that matters any.

Icons Or Checkboxes In A Listview...
Hi,
I am trying to add an icon or a check box onto my listview. but, whichever way I try I keep hitting problems.

My listview is set to lvwReport, when I use lvwicon or small icon my text for the different headers seems to go. So, when using the checkbox facility with my lvwreport the check box will only come in the first column. I dont mind shifting my columns to accomodate, but how do I give the checkboxes their own header?

Ideally what I want is the checkboxes (or an icon of a tick) to show in my 4th column, and I have looked at all the postings for listviews here and have followed all the threads but either its above my head, or no answer is given.

Here is the code (you can see that I have tried a few things):

Dim i As Integer
Dim X As Integer
Dim itmX As ListItem

Screen.MousePointer = vbHourglass
ListView3.ListItems.Clear
Set rstDiary = datCustomerDb.OpenRecordset("Select * from Diary where dc_code=" & Chr(34) & Trim(rstCustomer.Fields("c_code")) & Chr(34) & " order by d_date desc, d_time desc;", dbOpenDynaset)
If rstDiary.RecordCount > 0 Then
If rstDiary.RecordCount > 10 Then
X = 10
Else
X = rstDiary.RecordCount
End If
For i = 1 To X
Set itmX = ListView3.ListItems.Add(, , Format(rstDiary!d_date, "dd/mm/yyyy"))
itmX.SubItems(1) = Format(rstDiary!D_Time, "hh:mm")
itmX.SubItems(2) = IIf(IsNull(rstDiary!d_text), "", rstDiary!d_text)
Set ListView3.Icons = ImageList1
' If rstDiary!doc_present = True Then
' itmX.SubItems(3).Checked = vbChecked
' itmX.SubItems(3).SmallIcons
' Else
' itmX.SubItems(3).Checkboxes = False
' End If
itmX.SubItems(3) = IIf(IsNull(rstDiary!doc_present), "", rstDiary!doc_present)
itmX.SubItems(4) = IIf(IsNull(rstDiary!D_Inits), "", rstDiary!D_Inits)
itmX.SubItems(5) = IIf(IsNull(rstDiary!d_outst), "", rstDiary!d_outst)
' If rstDiary!doc_present = True Then
' itmX.Checked = True
' End If
itmX.Tag = rstDiary!d_recno
rstDiary.MoveNext
Next
End If
ListView3.Refresh
Screen.MousePointer = vbDefault

I really hope someone can tell me where I'm going wrong with this - I appreciate that its a simple problem, I just need some help to find the answer!

Cheers!

ListView Icons In 1st Column
Hi all!
I'm pretty new with ListView control. What I want to do is to add an icon in the 1st column items. I added an ImageList and I think it's liked perfectly with the ListView, but I only get icons from 2nd column and so on...
Any ideas?

Thanks!!

Listview Columnheader Icons
How do you insert the Icons into the column header in VB 5?

Also how do you program the headers to sort the columns if it has been clicked.

Thanks

File Associated Icons In A Listview
Does anyone know how I'd get the icons of associated programs to appear in a listview control. I know how to get my own to appear but I want to populate the control with the word icon for a .doc document, an AutoCAD icon for a .dwg file...

I could do it manually but I can't account for all apps possible. I know windows tracks them so there must be a way to do it.

Thanks,
Bernie

File Icons In Listview
I'm making a little ftp client, and I have an iconview listview to list the files on the server.. I need it to show the icon associated to the file added. I saw a post like this before but couldn't find it.. Any ideas?

Align Listview Icons
I've currently got a listview (set to Report) which displays some info....no troubles there. I've now added an icon to the first column (date) if a certain criteria is met.

My question is can I move the icon which is displayed to the left of the date to be displayed to the right of the date? Current display attached.

Add Icons To Listview Rows
Is it possible for each row to have a column with a picture in it?Mine are going to be pretty small, itd be a nice picture to add in each column. Note: i dont want a new control..ive done to much code to change that now

Listview Icons And Dragging
Is it possible to have the listview Items containing icons not able to drag? If so how?

ListView Icons *RESOLVED*
Until now, my form was working fine. There is a form I have called frmUserList. It has a listview control which displays a list of users in the Icon view with small icons. Until now for the last 2 months it has been working fine, I got a designer to make new images for the GUI of the whole application and now its suddenly giving me an error. Here's the code from the load event of the form frmUserList.





Code:

Private Sub Form_Load()

Call FillUserListView
gSelectedUserName = vbNullString
CenterForm Me

End Sub




Public Sub FillUserListView()


Dim rs As Recordset
Dim StrUserName As String


With lstvwUsers
.ListItems.Clear
.View = lvwIcon
.HideSelection = False
.SortKey = 0
.SortOrder = lvwAscending
.Sorted = True

Set .Icons = MDI.imglst

Set rs = PMData.GetData("select [User Profile - Current Status].* from [User Profile - Current Status]")
If rs.RecordCount = 0 Then
If rs.State <> adStateClosed Then rs.Close
If Not rs Is Nothing Then Set rs = Nothing
Exit Sub
End If

Do
StrUserName = rs("User Name")
.ListItems.Add , StrUserName, StrUserName, , "imgUser"
rs.MoveNext
Loop Until rs.EOF

If rs.State <> adStateClosed Then rs.Close
If Not rs Is Nothing Then Set rs = Nothing
End With

End Sub


Now that I've made some changes to the GUI as in removed all the previous pics and added new ones and changed all forms, I get this error.

"ImageList must be initialized before it can be used"

Please don't tell me I have to set the ImageList for each type at design time. It's been working fine till now until before I got this error.

Listview - Icons - Spacing
3 questions:

1) How can you lock the position of icons (LARGE) in listview?

2) How can you control the spacing between icons (LARGE) in listview?

3) Any extensive tutorial in LISTVIEW out there?

Copyright © 2005-08 www.BigResource.com, All rights reserved