G
Guest
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
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