This topic contains 2 replies, has 3 voices, and was last updated by
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.
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 SAPIEN.com in their forums – they've a lot of experience working with GUI elements in PowerShell.
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.