Can't figure out why this line gives me a compilation error:

 window = GlideLoader.LoadWindow(Resources.GetString(Resources.StringResources.Window));

Window is a txt file on resource folder.
The errors:

mTest.Resources’ does not contain a definition for ‘StringResources’

mTest.Resources’ does not contain a definition for ‘GetString’

following this example about glide…


@ bioengproject - Did you take care of the namespace where the Resource class is assigned ?

@ LouisCpro - Can you elaborate?

@ bioengproject - The message can have 3 origins :

  1. The Resources class is in a different namespace than the class where you call it, so that you have to right click on the class name, and choose “Resolve using”.

  2. There was an error during the Resources creation and the given methods GetString and
    StringResources were not created. In this case, drop the resource and recreate it from scrash.

  3. You added your text file in the wrong resource type, so that it is not imported as string but maybe as binary…In this case, drop the text file in the resource and ensure you choose the “Text” type before importing it again.

@ LouisCpro - Check this out, The class resource doesn’t contain these function…
How can I modify it?

I remember something about this… have you read and followed:

@ bioengproject -

OK, it is the third reason !

Open the Resources.resx, search for you textfile and delete it, then select the Text type, and import the textfile again !

This is because you added the file as a resource, rather than adding a string entry for Window. If you want it to work with a string resource, go into the Resource editor (Resources.rex) and click the drop down so that it shows string resources. For the name, place Window, and for the value place the contents of your file.

@ James - You’re right, string type not text as i said :whistle: