472,110 Members | 2,224 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,110 software developers and data experts.

Resource File Editting Issue Using WinRes.exe

Hi all.

I have a frustrating issue that I can't seem to figure out. EXPERTS
please help me~! Deadline is coming up soon~!

My task is to localize a winform application. The .Net Designer
creates its own .resx file (i.e. form1.resx) for each form. I realized
that I was not able to add any strings inside that .resx file because
the .Net Designer will overwrite that .resx file causing me to lose
the strings I add. Therefore, I created a separate .resx file (i.e.
form1.en.resx). I did this by using the winres.exe tool provided by
..Net (default: C:\Program Files\Microsoft Visual Studio .NET
2003\SDK\v1.1\Bin\winres.exe). I opened the designer created .resx
file (which I set Localizable to TRUE) inside winres.exe and saved it
as the ENGLISH language. There was no modification done since the
Designer created .resx file was already in english. By creating this
separate .resx file (form1.en.resx), I am now able to add new strings
to the .resx file without having to worry that the Designer will
overwrite it.

This is where my issue starts. Once I added new strings into the
english .resx file (form1.en.resx), I was not able to open it back up
in winres.exe. I keep receiving the error:

************************************************** **
An error occurred while loading the document. Fix the error, and then
try loading the document again. The error message follows:

Length cannot be less than zero.
Parameter name: length
************************************************** **

Once I delete the strings I added to that .resx file, then I was able
to open up that .resx file in winres.exe again.

It is IMPORTANT that the english .resx file be able to open in
winres.exe because this will be the tool that other developers in
other countries will use to translate the english to their language,
format the size of the forms to adjust to text length changes, and
save be able to save the changes as a separate .resx. Once they are
done with the forms, then they will use a separate tool
(reseditor.exe: also provided by .Net. DEFAULT:C:\Program
Files\Microsoft Visual Studio .NET
2003\SDK\v1.1\Samples\Tutorials\resourcesandlocali zation\reseditor\reseditor.exe)
to translate the strings that I added.

The strings that I added into the .resx files are strings that will be
used in message boxes. It is impossible to edit these text using
winres.exe because winres.exe allows you to only edit what's on the

Any help on this would be greatly appreciated. Thanks in advance.
Nov 16 '05 #1
0 2082

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Dan H. | last post: by
3 posts views Thread by Barry | last post: by
1 post views Thread by Albano Alves | last post: by
5 posts views Thread by Jack Russell | last post: by
2 posts views Thread by Dave Brown | last post: by
reply views Thread by =?Utf-8?B?UGF1bCBIYWdlcg==?= | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.