Resource Files

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi,
Trying to access some resource files that I originally created in a C# proj.
Added a copy of the "String1.resx" file to the VB project then opened My
Project and added the file to the resources.
This seemed happy enough in that it created a text file icon in the
resources panel.
But I am lost as to how to access it.
In C#
I would create a resource manager using a reference to the file in the
constructor.
rm = new ResourceManager("WidgetProj.StringRes1",
Assembly.GetExecutingAssembly());

The VB version of this executes without error but I can't get access to the
strings.

i.e.

myString =rm.GetString("String15") gives an error "Could not find any
resource appropriate for the specified culture or the neutral culture..."

Intellisense exposes the Resource File through the My.Resources.StringRes1
but not in any useful way that I can see.

I tried assigning to the Default resource manager exposed by My.Resources.
Although this executes OK it only returns empty strings

rm = My.Resources.ResourceManager()

Me.sbpSms.Text = rm.GetString("StringRes1.String121")

or

Me.sbpSms.Text = rm.GetString("String121")

both return empty strings. What is the correct way to access string resource
files that have been added to the project?


.



Relevant Pages

  • RE: Easier way to add entries into Resource file?
    ... You can easily make scripts that adds Empty strings for the other languges, ... check if that string exist in the language you have specified. ... > resource files through ResourceManager. ...
    (microsoft.public.dotnet.general)
  • Re: Can Team Member updates flow to Resource Manager before Proj M
    ... the delegation process in EPM and I would like to request your help. ... The project manager assigns the resource manager to any tasks that ... reviews and either approves Team ...
    (microsoft.public.project.pro_and_server)
  • Re: Can Team Member updates flow to Resource Manager before Proj M
    ... the delegation process in EPM and I would like to request your help. ... The project manager assigns the resource manager to any tasks that the ... reviews and either approves Team ...
    (microsoft.public.project.pro_and_server)
  • Re: Can Team Member updates flow to Resource Manager before Proj M
    ... RM could reject the task back to the resource (any discussion with the ... The project manager assigns the resource manager to any tasks that ... The RM selects a task and clicks the Delegate Task button ... reviews and either approves Team ...
    (microsoft.public.project.pro_and_server)
  • Re: Getting URLs
    ... "Executes wget to put the search result into ... portable across Lisp systems (ok this is a Windows eecutable, ... feature behind the GET-URL function. ... It indicates the resource should be stored in this file. ...
    (comp.lang.lisp)