Listview Icon Or Picture
I'm currently trying to make a listview during runtime that adds in values, etc. I want the first item to be an icon or picture based on what it is and I can't seem to find a way to get a column to have an icon at all. I've tried just about everything I can think of. Can someone help me out?
One of my failed attempts to give you a better idea of what I mean. Code: Set itmListItem = ListView1.ListItems.Add(, , "") itmListItem.SubItems(1) = "" itmListItem.SubItems(2) = strFrom itmListItem.SubItems(3) = strSubject itmListItem.SubItems(4) = strTime ListView1.ListItems.Item(lngIndex).key = strFilePointer ListView1.ListItems.Item(1).Icon = imgList.ListImages(3).Picture What i'm trying to do is something like Outlook does when you have an unread mail it shows the little envelope and after you read it it goes away. Thanks in advance.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
ListView, Icon And A Picture
I have an icon in a picturebox and want it as the icon in a listview. i have tried using ImageLists but i got nowhere. ANy help?
Picture(Icon) -> Picture(Bitmap) How?
How do I convert a Picture object containing an Icon (from a file) to a Picture object containg a Bitmap with a certain color (pink!) for the transparent portions of the icon?
I have gotten to the point where I have a HBITMAP but how do I create a Picture object that encapsulates this handle?
Thanks.
Picture Box To Icon
I am working on a program that i would like to have a dynamic systray icon.
i have the systray part working i can make the image in a picturebox. the only thing i cant seem to do is out put the file to a .ico file. I looked at planet source code and found an icon editor but was unable to understand the code at all.
can any one point me to a small guide or some good info?
Thank you
GeeKman
Icon - Picture
Hi
I would like to know how i can put a picture as the icon of a compiled program.
Ive heard that i have to put a picture in the "Icon" properties menu (.ico) in the form that the program starts off with.
Is this the way to go about the problem? If so how do i do it...cause i tried inserting a picture that i created in Paint , by saving it as a 16 colour file and it still doesnt work.
Thanks for your help!
Icon - Picture
Hi
I would like to know how i can put a picture as the icon of a compiled program.
Ive heard that i have to put a picture in the "Icon" properties menu (.ico) in the form that the program starts off with.
Is this the way to go about the problem? If so how do i do it...cause i tried inserting a picture that i created in Paint , by saving it as a 16 colour file and it still doesnt work.
Thanks for your help!
Icon/Picture
In the Form at the top, where you are suppose to have a image, how can I change this image to my own custom image?-thanks
Checking If A Picture Is An Icon
Hello!
As is the theme of my posts tonight, I'm making a class module which adds/modifies/removes icons in the system tray. It is all working very well but there are a couple of nagging things which I'd really like to clear up, one of which is this:
One of the properties of my class is the Icon property where I pass an icon in a variable of type STDPicture:
Code:
Property Let TrayIcon(picIcon as STDPicture)
'now some gubbins to place picIcon in the system tray
End Property
How would I check that picIcon is always an icon, and not a Bitmap or GIF etc...? You see, I know to always pass an icon but potentially there could be other coders who get to use my class who may not know. Is there a specific ICON variable type or is there a
Code:
TypeOf(picIcon) = vbIcon
sort of thing?
Icon = Invalid Picture?
Hey,
I have a 64x64 .ico file. It was saved specifically as a .ico file but VB tells me "Invalid picture". Why is that?
Thanks,
-Matt
Invalid Icon Picture??
I was making a form that I wanted to have an icon different then the default VB 6.0 icon. I have a valid .ico picture that a friend made and I tried to use it and it said it was an "invalid picture". Is there a proper way of setting an icon for a form that I don't know about?
Invalid Picture In Icon
Hi to all:
I had try to insert a icon in a form made by articons format 48*48,and I got a message:"Invalid Picture".
Something wrong with the format of the icon,or something limitation by VB??
Thanks
Convert Picture To Icon
How do I convert a picture in a picturebox to an icon type without using the imagelist control. I want a function like the extract icon function on the imagelist control.
Thanks
Icon Picture Questions
Hi,
Is is possible to add a picture of an icon beside the menu editor? Let say I have "Help" as one of my caption in the menu editor and want to add a picture icon of a "?" infront of it, can I do that?
Thanks.
Change .exe Program Icon Picture
may i know how to change my .exe program image(appearance? i dun want it to appear as a form, i had a global picture and wish to make my .exe program icon with the picture
How To Change Setup Icon(picture)
Hi everyone
I wanted to make setup of my application. I got it but i want to change the setup icon(picture) . it gives by default as like our vb form. I want to change that icon to new my selected icon(picture)
Please help me how to do so?
waiting for reply.
Thanx and regards,
ASIF
Invalid Picture When Adding Icon
Hey,
I am trying to add an icon to my form and each time I try it I get a error saying "Invalid Picture". The Icon is a valid .ico file (Not just renamed to .ico or anything like that).
Please help!
Thanks,
Tom
Invalid Picture When Assigning An Icon
hi, i tried to assign an icon in my form... at first i was able to load some "flat icons" those with 2 colors or less and it worked but now i want assign better looking icons to my app and i get an error message that says: invalid picture... why? it's still the same .ico file! is it because of the size format of the color?
How Can I Set A Dinamic Picture In The Form's Icon ??
How can I set a dinamic picture in the form's Icon ??
This is the test code I'm trying to do this:
VB Code:
Option Explicit Private Sub Form_Load() Picture1.AutoRedraw = True Timer1.Interval = 10 Timer2.Interval = 1000 Me.ScaleMode = vbPixels Picture1.ScaleMode = vbPixels Picture1.Move 0, 0, 16, 16End Sub Private Sub Timer1_Timer() Picture1.Line (16 * Rnd, 16 * Rnd)-(16 * Rnd, 16 * Rnd), RGB(255 * Rnd, 255 * Rnd, 255 * Rnd)End Sub Private Sub Timer2_Timer() Set Picture1.Picture = Picture1.Image Set Me.Icon = Picture1.Picture ' < - I get error hereEnd Sub
How Can I Put This Icon In Image (image1.picture)?
Hello
I can get icon for any filse whit this code and draw that on form.
How I can put that icon in Image (image1.picture)?
VB Code:
'Create a new project, and add this code to Form1Const DI_MASK = &H1Const DI_IMAGE = &H2Const DI_NORMAL = DI_MASK Or DI_IMAGEPrivate Declare Function ExtractAssociatedIcon Lib "shell32.dll" Alias "ExtractAssociatedIconA" (ByVal hInst As Long, ByVal lpIconPath As String, lpiIcon As Long) As LongPrivate Declare Function DrawIconEx Lib "user32" (ByVal hdc As Long, ByVal xLeft As Long, ByVal yTop As Long, ByVal hIcon As Long, ByVal cxWidth As Long, ByVal cyWidth As Long, ByVal istepIfAniCur As Long, ByVal hbrFlickerFreeDraw As Long, ByVal diFlags As Long) As LongPrivate Declare Function DestroyIcon Lib "user32" (ByVal hIcon As Long) As LongPrivate Sub Form_Paint() 'KPD-Team 1999 'URL: [url]http://www.allapi.net/[/url] 'E-Mail: [email]KPDTeam@Allapi.net[/email] Dim mIcon As Long 'Extract the associated icon mIcon = ExtractAssociatedIcon(App.hInstance, "C:Program FilesMSN Messengerlicense.rtf", 2) 'Draw the icon on the form DrawIconEx Me.hdc, 0, 0, mIcon, 0, 0, 0, 0, DI_NORMAL 'remove the icon from the memory DestroyIcon mIcon End Sub
thanks
Load Picture From Icon Library?
Is it possible to load a specified icon from an Icon Library (.icl) ? For instance:
Image1.Picture = LoadPicture("C:WindowsSystemshell32.dll,19")
doesn't work and returns a 'path not found' error. Is there a way to get the icon index number to load?
Icon Or Picture In The Form.Caption
Hello all,
Does anyone know how to put a picture(icon, bmp, gif, jpeg) into the form.caption bar? I am would like to put a company logo in to the caption bar.
Thank you,
ListView Icon
How would I make a ListView display an icon at the left then show text right next to that?
Set Listview Icon
My Listview is associated with an imagelist that has 2 icons. I want to set either one based on the value of a boolean variable. I've tried this but doesn't work:
Code:
If MyFlagThen
Set ListView1.MouseIcon = ImageList1.ListImages(0).Picture
Else
Set ListView1.MouseIcon = ImageList1.ListImages(1).Picture
End If
I'm afraid I'm at a loss.
Listview Icon
Hi,
In Listview i want add corresponding file icons.....how can i add this.....any body know abt plz tell me......
Thankyou....
Regards,
Kavi_k
Icon In Listview
How can i add icon in a listview.
I load my listview with shortcut(*.lnk,*.pif)and i want their icon in the listview.
Changing Command Button To Picture Icon
Is there a way to change a command button to appear as an icon of my choosing. It looks boring with regular command buttons so is there a way to make them a picture?
Thanks.
Adding A Picture/icon In A Toolbar Problem
I'm trying to add an icon to my toolbar. I already inserted pictures in the imagelist. But when I try to select the Imagelist1 object in the ImageList property of the toolbar I always got <none> after clicking apply. anyone who knows why? please help
- SysTray Icon From PictureBox.Picture Using Bmp Images
Hi, is it possible to use a picture from a picturebox (16x16 px bmp) for the SysTray Icon?
Normally i use Icons for it, but I was hoping not to have to create 121 seperated icons for this, as i allready have all the pictures in an imagelist, it would take me a bunch of time again.
The Systray Icon doesn't want to appear when using a 16x16 px picture instead of icons. Is this actually possible? Does the Shell_NotifyIcon Icon property only accept Icons?
Thanks at front.
Edited by - T48 - [RedPlanet] on 1/23/2005 7:43:16 AM
Show The Picture In A Small Icon On A Report
I have a group of pictures, each on is separate in an http link. I would like to show the picture in a small icon on a report. Can anyone lead me in the right direction?
ps."I'd also like to do this on a Form"
Ensample of table:
Links:
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7216_400.JPG
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7216_400.JPG
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7216_400.JPG
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7216_400.JPG
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7216_400.JPG
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7216_400.JPG
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7216_400.JPG
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7216_400.JPG
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7216_400.JPG
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7216_400.JPG
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7217_400.JPG
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7217_400.JPG
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7217_400.JPG
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7217_400.JPG
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7217_400.JPG
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7217_400.JPG
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7217_400.JPG
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7217_400.JPG
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7217_400.JPG
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7218_400.JPG
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7218_400.JPG
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7218_400.JPG
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7220_400.JPG
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7220_400.JPG
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7221_400.JPG
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7221_400.JPG
HTTP://WWW.SHOPPINGSOURCE.COM/WSS/ASSETS/PRODUCT_IMAGES/7221_400.JPG
Drawing 32bpp Icon Over Anotther Picture
All examples to draw XP icons can only draw it on a previously cleared PictureBox, therefore none of them allow to keep the original background behind the icon.
Is there some decent way to extract an 32bpp icon and draw it over another picture or image control?
Keep Icon Viewable In ListView ?
(VB6)
I'm using a ListView, and everything seems ok, except when I use icons in the list.
Then, when you select an item (or row), the text gets reversed, but the icon get obscured.
See a picture of the problem here:
snap.gif
Is there a way to keep the icon from 'reversing' or whatever is happening to it when a ListView row is selected?
ListView SubItem Icon
On the ListView, I am trying to get the icon number for the SubItem icon. I have two icon colums on my ListView. One is a SmallIcon, the other is a SubItem icon.
This is the code to add a SubItem icon:
Code:
.ListItems(Index).ListSubItems.Add , , , ICON, TOOLTIP
I would like to know how to find out what the ICON variable is and also the TOOLTIP.
Any ideas?
Sorting A Listview By Icon
I have a listview in report view with 3 columns - 1. Icon, 2. Date, 3. Details.
I can sort the date and details columns with no problems when the column header is clicked.
However, I'd like to group the icons together when column 1 header is clicked.
Each listitem has one of 4 different icons.
How do I do this?
Thanks in advance.
Print Icon In Listview
Hello,
I like to print the informations in a listview.
No problems so far as long as I have to print out text only.
The problem occurs when I try to print the first item which contains a smalicon. I like to print this icon as a graphic.
How can I do this?
Thanks for help
ListView Displays Icon
Dear Users,
I got ListView and ImageList, but then i'd tried to display the Icon. But it seems to be not working..
I really out of ideas.
Hopefully someone can give me some solution...
Thanks & Regards,
KahFui
Listview Icon In Report
Im using the listview control in report view and am trying to add an icon into one of my columns. Is it possible to do this or is it going to take some tweaking? (Im using Common Controls 5.0 so it is compatable with an XP style manifest file.)
Code:
Dim lvwItem As New ListItem
Set lvwItem = lvwInfo.ListItems.Add
lvwItem.Text = "" 'need an icon here
lvwItem.SubItems(1) = "Column 2"
lvwItem.SubItems(2) = "Column 3"
Icon In Listview Report
Hi!
I got a listview with 2 columns, Icon and Text and its displayed as Report...
How do I list an item with an icon in the first column?
Tnx!!
Keep Icon Viewable In ListView ?
(VB6)
I'm using a ListView, and everything seems ok, except when I use icons in the list.
Then, when you select an item (or row), the text gets reversed, but the icon get obscured.
Is there a way to keep the icon from 'reversing' or whatever is happening to it when a ListView row is selected?
Toolbar/listview 5.0 Icon
i have a problem in using 5.0, i add image or icons. when i run the program, the image works well.. when i close the vb6 and run the program, the image/icons looks old?
what image and icons are compatible with comctl32.ocx? help me pls?
Listview Icon Problem
I'm using a listview to display the results a a quiz that's given to the user.
I want each line to display one of three icons:
"right", "wrong", or "incomplete"
I've added an imagelist with 3 icons that are keyed to match.
I set the imagelist for both the Normal and Small icons properties of the listview.
But when I run the code I always get the 1st icon.
It doesn't matter if I call the icon by key or index.
Any help?
VB Code:
With lsvResults .ListItems.Clear For lQ = 0 To UBound(g_lSelectedQs) If g_tQuestions(lQ).Answered Then If g_tQuestions(lQ).Correct Then sKey = "right" lIndex = 1 Else sKey = "wrong" lIndex = 2 End If Else sKey = "incomplete" lIndex = 3 End If .ListItems.Add(, , CStr(lQ + 1), sKey, 1).ListSubItems.Add , "|", g_tQuiz.Qs(g_lSelectedQs(lQ)).Question' .ListItems.Add(, , CStr(lQ + 1), lIndex, 1).ListSubItems.Add , "|", g_tQuiz.Qs(g_lSelectedQs(lQ)).Question Next End With
Listview Report Icon
Hi guys, how can i center-align a ReportIcon of a listsubitem on a listview control?
ListView Header Icon
I am having slight difficults with my ListView.
The headers of a listview would be like this when they are loaded:
Code:
|Header1 |Header2 |Header3 |
Then I assign an icon to one of them:
Code:
|Header1 |[ICON]Header2 |Header3 |
Then when I remove the icon, it looks like this:
Code:
|Header1 | Header2 |Header3 |
That is ugly. How can I get the text to go back in the initial position ?
ListView Toggle Icon
Hi all,
I am using a listview control in report view.
I have 2 icons in an image list bound to the listview.
Depending on a certain criteria, a listview item will be assigined a small icon index of 1 or 2 (where 1 = on an 2 = off). I also have full row select set to true.
Now, what I want to happen is this:
When a user clicks an item, the smallicon will change or toggle.
I am using the following code:
Code:
Private Sub lvwMain_ItemClick(ByVal Item As MSComctlLib.ListItem)
With Item
If .SmallIcon = 1 Then
.SmallIcon = 2
Else
.SmallIcon = 1
End If
End With
End Sub
Here is the problem:
If I click on the small icon, the toggle works fine however if clicked anywhere else on the selected row, the icon toggles and then toggles back to its original state. It is like the item click event is firing twice in this instance.
It seems a pretty simple thing to achieve but have not been able to figure it out yet.
Any help is most appreciated.
Cheers
Jack
Listview Icon In Header
I have a listview in report view. I want to have an icon as one of the headers of the listview. I keep getting an error when I try to do this. What is the actual code to do this? I am using an imagelist to hold my icons.
Icon Positions In ListView
I am trying to save the icon positions in a listview control so that I can restore them the next time the application is open.
When I save the position, it works fine, however when I restore them, it sets each icon to the correct value but the LV controls moves everything over either to the left or top. I have made sure that the align property is set to none.
Any idea how to either get this to stop happening or work around it?
|