Adding icon to a listview control

Welcome Forums General PowerShell Q&A Adding icon to a listview control

This topic contains 2 replies, has 3 voices, and was last updated by

3 years, 9 months ago.

  • Author
  • #28471

    Topics: 1
    Replies: 0
    Points: 0
    Rank: Member

    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

    Topics: 13
    Replies: 4872
    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    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

    Topics: 4
    Replies: 262
    Points: 60
    Rank: Member

    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.

The topic ‘Adding icon to a listview control’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort