Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / December 2004

Tip: Looking for answers? Try searching our database.

winres bug

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
AndrewEames - 16 Dec 2004 16:35 GMT
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
AndrewEames - 17 Dec 2004 19:47 GMT
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

> 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
[quoted text clipped - 22 lines]
>   Thanks
>      Andrew

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.