This has been bothering me for the last couple of hours.

Here is what I would like to do.
I want to create a sample when a button is clicked, depending on Culture I
would like to display the flag.

What I did was create a resx file using ResxResourceWriter and AddResource
Method. I included few countries' flags in the resx file. I used resgen to
create the .resource file.

I am using the following lines of code:
rm = New ResourceManager("MyImages", Me.GetType().Assembly)

and

PictureBox1.Image = CType(rm.GetObject("MyImage", ci), System.Drawing.Image)

Using the reseditor I could see the bitmap files in the file. When I run the
sample I keep getting the error -
**********************************************
An unhandled exception of type
'System.Resources.MissingManifestResourceException' occurred in mscorlib.dll

Additional information: Could not find any resources appropriate for the
specified culture (or the neutral culture) in the given assembly. Make sure
"MyImages.resources" was correctly embedded or linked into assembly
"ResourceFileSample".

I tried including the .resources file in the peoject, compiled but still got
the same error.

I tried creating the resource dll and included in the reference but no change.

I have the subdirectories created for the test Cultures an d created the
corresponding resource files.

Is my understanding wrong? Please help or any links that I can look into
will be a great help

Re: Resource Files, Satellite Assembly - newbie by Morgan

Morgan
Sun Jan 02 00:13:38 CST 2005

I think u have to include the name of the assembly

as such in your call to create the ResourceManager

rm = New ResourceManager("ResourceFileSample.MyImages",
Me.GetType().Assembly)
^^ the change..

Morgan




"vb" <vb@discussions.microsoft.com> wrote in message
news:B42DD09F-9650-40B2-88DB-58D3C3419B4C@microsoft.com...
> This has been bothering me for the last couple of hours.
>
> Here is what I would like to do.
> I want to create a sample when a button is clicked, depending on Culture I
> would like to display the flag.
>
> What I did was create a resx file using ResxResourceWriter and AddResource
> Method. I included few countries' flags in the resx file. I used resgen to
> create the .resource file.
>
> I am using the following lines of code:
> rm = New ResourceManager("MyImages", Me.GetType().Assembly)
>
> and
>
> PictureBox1.Image = CType(rm.GetObject("MyImage", ci),
> System.Drawing.Image)
>
> Using the reseditor I could see the bitmap files in the file. When I run
> the
> sample I keep getting the error -
> **********************************************
> An unhandled exception of type
> 'System.Resources.MissingManifestResourceException' occurred in
> mscorlib.dll
>
> Additional information: Could not find any resources appropriate for the
> specified culture (or the neutral culture) in the given assembly. Make
> sure
> "MyImages.resources" was correctly embedded or linked into assembly
> "ResourceFileSample".
>
> I tried including the .resources file in the peoject, compiled but still
> got
> the same error.
>
> I tried creating the resource dll and included in the reference but no
> change.
>
> I have the subdirectories created for the test Cultures an d created the
> corresponding resource files.
>
> Is my understanding wrong? Please help or any links that I can look into
> will be a great help



Re: Resource Files, Satellite Assembly - newbie by vb

vb
Tue Jan 04 21:43:04 CST 2005

Hi,
I apologize for the delay in response.

Thanks it worked well for nuetral culturs but how about others. The way I
did was create a folder for ex - de-DE for German. I create the resource file
with the names MyImages.de-DE.resx file in this folder. I compile a resource
file with resgen and set the currentthreads currentculture to "de-DE". German
flag could not be retrieved, it still retrieves the same nuetral flag.

Thanks again

vb

"Morgan Vermef" wrote:

> I think u have to include the name of the assembly
>
> as such in your call to create the ResourceManager
>
> rm = New ResourceManager("ResourceFileSample.MyImages",
> Me.GetType().Assembly)
> ^^ the change..
>
> Morgan
>
>
>
>
> "vb" <vb@discussions.microsoft.com> wrote in message
> news:B42DD09F-9650-40B2-88DB-58D3C3419B4C@microsoft.com...
> > This has been bothering me for the last couple of hours.
> >
> > Here is what I would like to do.
> > I want to create a sample when a button is clicked, depending on Culture I
> > would like to display the flag.
> >
> > What I did was create a resx file using ResxResourceWriter and AddResource
> > Method. I included few countries' flags in the resx file. I used resgen to
> > create the .resource file.
> >
> > I am using the following lines of code:
> > rm = New ResourceManager("MyImages", Me.GetType().Assembly)
> >
> > and
> >
> > PictureBox1.Image = CType(rm.GetObject("MyImage", ci),
> > System.Drawing.Image)
> >
> > Using the reseditor I could see the bitmap files in the file. When I run
> > the
> > sample I keep getting the error -
> > **********************************************
> > An unhandled exception of type
> > 'System.Resources.MissingManifestResourceException' occurred in
> > mscorlib.dll
> >
> > Additional information: Could not find any resources appropriate for the
> > specified culture (or the neutral culture) in the given assembly. Make
> > sure
> > "MyImages.resources" was correctly embedded or linked into assembly
> > "ResourceFileSample".
> >
> > I tried including the .resources file in the peoject, compiled but still
> > got
> > the same error.
> >
> > I tried creating the resource dll and included in the reference but no
> > change.
> >
> > I have the subdirectories created for the test Cultures an d created the
> > corresponding resource files.
> >
> > Is my understanding wrong? Please help or any links that I can look into
> > will be a great help
>
>
>