winres bug

G

Guest

I've run across a rather nasty winres bug which I can't find a workaround
for. The problem happens when a base class control has a subcontrol that is
not private and this subcontrol is modified in a derived control.

e.g.
make usercontrol1
make user control1 localizable
add label1
change modifiers on label1 to be protected
make usercontrol2 inherited from usercontrol1
make usercontrol2 localizable
change text of label1 in usercontrol2 to be something else

Now if you try and edit usercontrol2.resx with winres you get the following

There is already a component named 'label1'. Components must have unique
names and names must be case insensitive. A name also cannot conflict with
the name of any component in an inherited class

(Note that in order to get this far you must also have worked around a
different winres bug by copying winres and its assemblies to the directory
containing the assembly I just built)

Does anyone have a clue as to how to workaround this?
Thanks
Andrew
 
G

Guest

OK - This is driving me absolutely nuts. winres seems to be almost unusable
with inherited controls/forms that are at all interesting. Surely there must
be a hotfix for this - the thought of having to unravel my controls and forms
makes me shudder :)

I've found the following 2 bugs in winres

· If you have *any* public subcontrols in a base control, winres
will refuse to open the .resx file for the derived control. (This is
especially bad since its quite common to have a public panel in a base
control)

· If you have a control in a derived control that overlaps a control
in the base control, winres displays them in the wrong z-order. (This is
horrible – consider a panel in the base class control)

and for good measure, this bug in Visual Studio
· If you have a private container (e.g. panel,groupbox) in a base
control and drop something onto it in the derived control, Visual studio
generates the wrong code (it generates all the code to create the new object
but never adds it to anything) – the effect of this is that the dropped
control magically disappears after you compile

Please tell me I am missing something!
Andrew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top