|
-
Feb 28th, 2007, 05:33 PM
#1
[2005] External Resource File
.NET has that awesome ability to embed files into .NET assemblies and extract them at runtime. 2005 made it even easier with the application framework and the my namespace.
however what I am looking to do is the opposite. Keep an external resource file with images, icons, etc. in it, and access it at runtime.
Reason being my exe would be about half as large without all the images embedded into it, and that would help for when updates are downloaded from the web, as the images never change.
So while there are a million articles on doing it via an embedded file, I haven't come across any that show you how to load an external resource file and use it.
I bumped into an article that talks about using Satellite Assemblies. This may be something I can use, but they seem to be more for localizing your app for different languages. I don't need that, but if it can simply store images that I can retrieve later then I am fine using that.
Also having the files just sit in the app directory is NOT what I am looking for, its either external resource file or nothing...
-
Feb 28th, 2007, 06:08 PM
#2
Re: [2005] External Resource File
See
http://www.vbaccelerator.com/home/VB...es/article.asp
this is for vb6, but maybe the principle is portable to .NET
-
Feb 28th, 2007, 06:10 PM
#3
Re: [2005] External Resource File
no VB.NET resources are handled totally different than VB6
-
Feb 28th, 2007, 06:22 PM
#4
Re: [2005] External Resource File
I'm sure you're probably right. But that example is API based and I think the windows API LoadLibrary can read from both VB6 and .NET resource files?
I just googled that subject and found a hint here http://www.dotnet247.com/247referenc...56/280411.aspx
Last edited by Bulldog; Feb 28th, 2007 at 06:26 PM.
-
Feb 28th, 2007, 06:35 PM
#5
Re: [2005] External Resource File
A satellite assembly is a DLL that contains nothing but resources. You could certainly create and use a satellite assembly for non-localised resources. If you want use loose .resource or .resx files then checkout the System.Resources namespace. You'd be most intersted in the ResourceReader and/or ResXResourceReader classes.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|