﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » .NET Forums » General .NET Discussion  » Add resources to a control subclass</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Fri, 12 Jun 2026 11:02:56 GMT</lastBuildDate><ttl>20</ttl><item><title>Add resources to a control subclass</title><link>http://forum.strataframe.net/FindPost8934.aspx</link><description>I'm sub classing a toolstrip and want to preadd some buttons (just like you do on you RichTextboxToolStrip control).  I can add the designer file, with the code that adds the toolstripbuttons/combos/etc. but can't figure out how to add the resource file with the images for the buttons.  If I add a resource file, I have to add a dependency manually to the main file. If I add resources to it via the property sheet, it gives me a warning about corrupting the form/control.&lt;br&gt;
&lt;br&gt;
So, how do I add a resource to the control?</description><pubDate>Wed, 23 May 2007 13:33:02 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Add resources to a control subclass</title><link>http://forum.strataframe.net/FindPost8989.aspx</link><description>Hehe, everyone has to learn.&amp;nbsp; It's better to ask and learn from the answer than to bang your head for 2 days trying to figure it out :)</description><pubDate>Wed, 23 May 2007 13:33:02 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Add resources to a control subclass</title><link>http://forum.strataframe.net/FindPost8963.aspx</link><description>Doh...Yep, there is it, the Items collection.  One of these days I'll start getting .NET enough to stop asking silly questions :blush:  In the mean time, thanks for you help!</description><pubDate>Tue, 22 May 2007 11:37:45 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Add resources to a control subclass</title><link>http://forum.strataframe.net/FindPost8947.aspx</link><description>Generally, on a ToolStripButton, you can just set the Image on the property sheet, and the designer will automatically create the .resx file for your component and add it to the project (if you select local resource in the editor for the image).&amp;nbsp; You can also select project resource from there, which will use the project's .resx file.&lt;/P&gt;&lt;P&gt;You should never have to manually add an .resx file to a&amp;nbsp;component... when you set a property that tries to use the resource file, it will create one automatically the first time it needs one.&lt;/P&gt;&lt;P&gt;Now, if it's giving you that error when you just try to set the Image property on a tool strip button, then there might be other problems...</description><pubDate>Tue, 22 May 2007 09:04:29 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>