How to create a resx file

Posted by anandknr on 02-Dec-2010 06:37

Hi all,   I need to create a resx file which will store my uploaded images..In .net it can be added under the project properties.please help me to do the same in openedge also...

All Replies

Posted by Admin on 02-Dec-2010 06:45

The Visual Designer maintains a resx file per Form/UserControl, not per project.

For project resources you'll have to code.

Would be a good ERS though...

Posted by anandknr on 02-Dec-2010 07:21

ok... so that means the progress equalent of the code given below willnot work...right?

http://www.java2s.com/Code/CSharp/Development-Class/Saveandloadimagefromresourcefile.htm

I thought it is pretty simple like just add a resx file using designer and use the given code after translation...Any way thanx for the support...

Posted by Peter Judge on 02-Dec-2010 07:25

Anand,

I don't think there are issues with retrieving resources from the resx file at runtime.

It's the

I thought it is pretty simple like just add a resx file using designer

part that's not easy at the moment.

-- peter

Posted by Admin on 02-Dec-2010 07:30

The resource writer class itself should just work fine.

Assembly.GetExecutingAssembly ()

This will probably not work. In the ABL the executing process is always the (unmanaged) prowin32.exe. You don't create your own assemblies (typically .dll files) in the OpenEdge Architect. Progress uses a help class (in the Progress.Util.* package) to work with the resources added to a Form at design time. But that's a Form level resource container - not a project or assembly level resource container.

I can't tell if that will bring you to your goal (don't understand exactly what you're up to).

Posted by Admin on 02-Dec-2010 07:50

part that's not easy at the moment.

 

As you're sitting next door to the people in charge... are you aware of plans to change this? It's a usual complaint I hear from users: The fact, that resources like a common Form image or reusable toolbar images are contained in every form's resx file rather than a single central one.

Posted by jquerijero on 06-Dec-2010 17:18

You can use the System.Resources.ResXResourceWriter to create standalone RESX file.

And use System.Resources.ResXResourceSet for reading back the RESX data. You can use it also for RESX file created using an external tool including Visual Studio.

This thread is closed