Hi Emmanuel,
Welcome to .net community. As for the .net resource files and satellite
assemblies, they are pure resources containers which only contains resource
objects( string , image or other serializable objects). Also, resource
file and satellite assembly are all binary files which are not human
readable. So we can manually embed .resource file into VS.NET project, but
it display it as binary file (not readable or editable format).
In fact, in VS.NET we use .resx( assembly resource file) to manipulate
resources. And when we build our project, the VS.NET will compile the .resx
file into .resource file and embeded the generated resource file into main
assembly(or satellite assembly) according to its cultureinfo.
So the first question you mentioned:
CREATING THE RESOURCES:
I think we can just create ".resx" file (add new item----> assembly
resource file) and add items into it. But the VS.NET IDE dosn't provide
full support for editing .resx file. If we want to add some binary data
such as image or our custom objects, it is recommended that we create a
separate application to generate resource (.resx). And the "ResEditor" is a
good tool (shipped with VS.NET as buildin tool in whidbey) for editing
existed resource or resx file).
USING THE RESOURCES IN VISUAL STUDIO FORM DESIGNER:
As for using resource in VS.NET design-time, I'm afraid there hasn't been
any means currently. As we could see, when we create different
resource(.resx) file for a locallized form , the VS.NET's design-time work
is just generate the code in the InitializeComponents method , and those
auto generated code also use the ResourceManager to retrieve the objects
from the assembly's embeded resources. So there is no means to directly use
items in resource files at design-time( at least no buildin api now).
Thanks & Regards,
Thanks & Regards,
Steven Cheng
Microsoft Online Support

Signature
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Emmanuel - 08 Feb 2005 11:48 GMT
Steven,
thank you very much for your answer.
But to clarify the things a little bit I would summarize your answer to the
following:
If someone wants to develop a "Word-Ready Application" as mentioned at the
.NET's Framework help file, and wants to put together the images and other
resources used in the application in an assembly file (dll), he has only one
way of doing it:
THE GOOD
===========
Creating the resources:
He should create another windows application, that gathers all resources
from the development directories and stuffs them inside a .resource file.
The resource file is then embeded inside the assembly during compilation
process. The class involved is the System.Resources.ResourceWriter class and
the related.
Using the resources:
Resources that reside in a separate satellite assembly can be used ONLY BY
CODE. using the System.Resources.ResourceReader class and the related.
THE BAD
=======
So Visual Studio integrated environment:
1. Cannot in any way create resource files (with images of course) nor you
can edit resource files with the tools provided by Visual Studio .NET 2003.
(A new tool called "ResEditor" will be available when the new version of
Visual Studio becomes available...)
2. The resource files in satellite assemblies cannot be used by the Form
Designer. So you cannot design forms using resources that reside in a
different satellite assembly.
Thanks again
Emmanuel
> Hi Emmanuel,
>
[quoted text clipped - 45 lines]
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
Steven Cheng[MSFT] - 10 Feb 2005 07:33 GMT
Thanks for your followup Emmanuel,
Yes, the currently resource manipulation support in VS.NET( until 2003) are
limited. And we can manually create and edit resx file(not .resource) file
and even the resx file's manipluation is limited( there hasn't a good edior
for resource in the current IDE). And form designer's support for resource
manipulation( for resx file) are only available when we dealing with
localizable form.
Thanks & Regards,
Steven Cheng
Microsoft Online Support

Signature
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)