Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / January 2005

Tip: Looking for answers? Try searching our database.

Resource Files, Satellite Assembly - newbie

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vb - 02 Jan 2005 02:35 GMT
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
Morgan Vermef - 02 Jan 2005 06:13 GMT
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

> This has been bothering me for the last couple of hours.
>
[quoted text clipped - 40 lines]
> Is my understanding wrong? Please help or any links that I can look into
> will be a great help
vb - 05 Jan 2005 03:43 GMT
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

> I think u have to include the name of the assembly
>
[quoted text clipped - 50 lines]
> > Is my understanding wrong? Please help or any links that I can look into
> > will be a great help

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.