Re: Resources help
Peter Osucha <[email protected]> Mon, 19 Mar 2007 08:42:54 -0400
| Newsgroups | gmane.comp.windows.devel.dotnet.cx |
|---|---|
| Message-ID | <[email protected]> |
Thanks, William. I guess I just need to keep reviewing the docs. I require knowledge of this to create satellite assemblies (or whatever MSDN calls them) for localized versions of this app anyway. I'll continue reading and post back with something more specific. Peter -----Original Message----- From: Discussion relating to the specifics of the C# and Managed C++ languages [mailto:[email protected]] On Behalf Of Fellows, William B. Sent: Friday, March 16, 2007 8:51 AM To: [email protected] Subject: Re: [DOTNET-CX] Resources help Peter, If I understand your needs correctly, this might be what you're looking for: In the properties for the icon, set build action to 'Embedded Resource'. This allows it become an integral part of your assembly. Now, whenever you want to use it, do something like the folling: Assembly myAssembly = Assembly.GetExecutingAssembly(); Icon myIcon = new Icon(myAssembly.GetmanifestResourceStream("MyNameSpace.MyIconName.ico"); - Bill -----Original Message----- From: Discussion relating to the specifics of the C# and Managed C++ languages [mailto:[email protected]] On Behalf Of Peter Osucha Sent: Thursday, March 15, 2007 4:32 PM To: [email protected] Subject: [DOTNET-CX] Resources help I have been reviewing the MSDN articles for some time on using resources in a C# application. The MSDN links seem to be quite circular - I'm learning a lot but getting nowhere. Any better place to learn about how resources can be accessed/interacted with within an app? (eg, I create an icon file in my project that I want to use as either a form icon, or as an image in an ImageList control - how can I do that?) Peter =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com