Adding icon to a listview control

Tagged: , , ,

This topic contains 2 replies, has 3 voices, and was last updated by Profile photo of Tim Pringle Tim Pringle 1 year, 2 months ago.

  • Author
  • #28471
    Profile photo of Rémy D.
    Rémy D.

    I trying to develop a GUI with a listview control, in which there are some of applications used in my office. But i would like to add applications relatives icon to my GUI, exactly like this exemple :

    In the better case, if possible, I don't want to have the .ico files saved on computers which will run this script.

    I don't find any results over the web ;'(

    Is anyone able to help me ?

    Thank's a lot in advance.

  • #28485
    Profile photo of Don Jones
    Don Jones

    I'm not aware of a way to embed the icon data in a PowerShell script. It may be possible, but I've only ever referenced .ico files.

    However, you might ask the folks at in their forums – they've a lot of experience working with GUI elements in PowerShell.

  • #28514
    Profile photo of Tim Pringle
    Tim Pringle

    Hi Remy,

    You can do this by first dragging an ImagesList to your form. Then click on the arrow on the top right of the control. From there, you can add as many images as you want to the control.

    Now click on the ListView control on your form, and change the LargeImagesList, and SmallImagesList to the imageslist control you just added.

    After you've done that click on the arrow at the top right of the ListView control, and select the Edit Items option. Now click Add, to add a member. From the list on the right hand side, you can select the images you want under the Behavior setting.

    RE Icons and graphics, you can get these embedded into your script automatically. Select the Deploy tab. and then 'Export to Clipboard'. They are automically converted to a base 64 string, and the script generated will also do the decoding for you.

You must be logged in to reply to this topic.