﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » How to re-use an imagelist control?</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 07:25:16 GMT</lastBuildDate><ttl>20</ttl><item><title>How to re-use an imagelist control?</title><link>http://forum.strataframe.net/FindPost16930.aspx</link><description>Hi, it is possible to have a global image list I could re-use in different forms?&lt;br&gt;
&lt;br&gt;
For some task I am saving the images in the project's Resource, but some controls like the ListView requires an ImageList control and I don't want to have to enter all images used by several forms in several ImageList controls.</description><pubDate>Tue, 10 Jun 2008 16:27:01 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to re-use an imagelist control?</title><link>http://forum.strataframe.net/FindPost16976.aspx</link><description>[quote]Also that could be a new SF ImageList control in future updates[/quote]&lt;/P&gt;&lt;P&gt;If it were that simple we would have already done it.&amp;nbsp; This will require that we replumb the ListView, etc.&amp;nbsp; At present this is still standard .NET logic.&amp;nbsp; Trust me, this has already crossed our minds hundreds, it not thousands of times!</description><pubDate>Tue, 10 Jun 2008 16:27:01 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: How to re-use an imagelist control?</title><link>http://forum.strataframe.net/FindPost16975.aspx</link><description>[quote][b]Trent L. Taylor (06/10/2008)[/b][hr]So when we use an ImageLIst control, we add a method that we call in the constructor or OnLoad that populates the image list from resource images...this way the images will always remain crisp and clean.[/quote]&lt;P&gt;Well that would be what I am looking for because in that case all my images will be in the common Resource File and then the image list would be programatically be filled with the images needed from the resource file.&amp;nbsp;Could you share some code on how to import the images from the resource file?&lt;P&gt;Also that could be a new SF ImageList control in future updates...:hehe:</description><pubDate>Tue, 10 Jun 2008 15:34:58 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to re-use an imagelist control?</title><link>http://forum.strataframe.net/FindPost16973.aspx</link><description>Thanks. That's what I've been doing, but Edhy's post got me thinking!  :D</description><pubDate>Tue, 10 Jun 2008 14:33:27 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: How to re-use an imagelist control?</title><link>http://forum.strataframe.net/FindPost16971.aspx</link><description>Greg:&lt;/P&gt;&lt;P&gt;[quote]&lt;TABLE cellSpacing=0 cellPadding=0 width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class=smalltxt vAlign=top&gt;&lt;SPAN id=ctl02_ctlTopic_ctlPanelBar_ctlTopicsRepeater_ctl09_lblFullMessage&gt;Is there any way to do this across a solution? I.e. have a resource file that is accessible from all the projects in a solution?&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;[/quote]&lt;/P&gt;&lt;P&gt;Not easily.&amp;nbsp; Really it is best to setup this up by project.&lt;/P&gt;&lt;P&gt;[quote]&lt;/P&gt;&lt;P&gt;I will try the resource file, but how to use those images in the resource file in the ListView, since this controls requires an ImageList controls to refer to?&lt;/P&gt;&lt;P&gt;[/quote]&lt;/P&gt;&lt;P&gt;We never use the designer for the ImageList control anyway as after a few compiles, the quality of the image degrades.&amp;nbsp; So when we use an ImageLIst control, we add a method that we call in the constructor or OnLoad that populates the image list from resource images...this way the images will always remain crisp and clean.</description><pubDate>Tue, 10 Jun 2008 13:22:03 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: How to re-use an imagelist control?</title><link>http://forum.strataframe.net/FindPost16967.aspx</link><description>Thanks Trent,&lt;/P&gt;&lt;P&gt;I will try the resource file, but how to use those images in the resource file in the ListView, since this controls requires an ImageList controls to refer to?&lt;/P&gt;&lt;P&gt;All I want to do is not having to add imagelist controls all over the app and use a single ImageList or Resource file for all my images for this project.&amp;nbsp; I hope this could be done since I hate to keep doing the same thing over and over and over ;)</description><pubDate>Tue, 10 Jun 2008 12:16:00 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to re-use an imagelist control?</title><link>http://forum.strataframe.net/FindPost16966.aspx</link><description>Is there any way to do this across a solution?  I.e. have a resource file that is accessible from all the projects in a solution?</description><pubDate>Tue, 10 Jun 2008 12:02:33 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: How to re-use an imagelist control?</title><link>http://forum.strataframe.net/FindPost16958.aspx</link><description>Sure, just create a resource file or use the resources in the project itself.&amp;nbsp; If you just right-click and add a new item, then select Resource File.&amp;nbsp; Then once in your project, add a new item to the resource file and select the image(s) that you want.&amp;nbsp; Also, be sure to set the imported images to Embedded instead of Content.&amp;nbsp; At this point, you can choose a local resource from anyplace within your project and select from that resource file.</description><pubDate>Tue, 10 Jun 2008 09:09:04 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>