My company is pretty excited about using WinRes.exe to localize forms.
However, I recently noticed what I believe is a bug in WinRes. If I set a
control's visible property to False in my winforms application, and then I
want to make that control visible with WinRes.exe. More specifically, it
will let me change the visible property to True, but it will not save that
change to the .RESX file.
Interestingly enough, if a control is visible by default, I can easily hide
it by setting Visible = False in WinRes. That works just fine. It's the
other direction that I can't go. This is a serious drawback for us. Has
anyone seen this problem? Is there a new version of WinRes.exe or something
that fixes this? I can work around it, but the work arounds are very ugly
and before I do I'd like to make sure that other people get the same
behavior and that there isn't a known fix.
Any help is appreaciated,
AJ
More info:
I peaked "under the hood" and it appears that when I set the visible
property to False originally, the default .RESX file gets an xml element for
the Visible property of the control with a value of False. All is well. I
then edit the RESX in WinRes, and set the visible property to True. Rather
than changing the value of the xml element, it actually removes the entire
xml element from the RESX file that it saves. Very odd. If I then build a
satellite resource using that RESX file, the control does not show up when I
run the applciation. Other changes that I make (e.g., moving stuff, changing
labels) with WinRes save just fine and show up when I run the application.