UserControl (System.Windows.Forms) Question

Posted on 2006-04-11
Last Modified: 2008-03-10
I am having a very odd problem adding a .resx file to a UserControl.

The user control is part of a Module (basically a class library) inside a Composite UI Application Block application. For some reason, I can't add a .resx file. I clicked on the folder which contains my UserControl and chose =>Add =>New Item=> ResourceFile. I gave my resource file the same name as the user control.

When it is added, it's not showing where I expected it would in the project hierarchy. It shows up directly under the UserControl, and the designer file, which previously occupied that space, is now under the newly-added .resx file. Not only that, but I get a warning message every time I try to edit it.

Am I missing something really obvious here? I can't find any reference to this problem in VS 2005 help, or on the net.

Question by:marmaxx
    LVL 3

    Accepted Solution

    Why don't you delete the user control.. create a new one with the same name , when it properly creates all parts (designer and .resx files), replace them with what you had previoulsly... not the best way, but it should fix the problem, i think..

    Author Comment

    That's the odd thing here.... It's not creating the .resx file when I create the user control (just the designer). That was the first thing I tried.

    I can't figure out why this is happening.

    Thanks for the feedback.
    LVL 3

    Expert Comment

    I'm not sure how to help you on this since I haven't had that problem so far. Hope someone else put some comments in here..

    I noticed that you are doing some work on Composite appln block.. i'm not sure if you can answer one of the questions i posted ... helper asking for help :)

    Author Comment

    Thanks prajeebkumar!

    Your answer put me on the right track. My issue had to do with a 'quirk' in VS2005, which I couldn't have discovered without you putting me on the right track. Thanks to everyone else as well for the feedback, it's appreciated.

    Sorry about the delay in responidng. certain matters arose in my personal life which required my immediate attention, hence, my absense from the forum.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Article by: Ivo
    Anonymous Types in C# by Ivo Stoykov Anonymous Types are useful when  we do not need to follow usual work-flow -- creating object of some type, assign some read-only values and then doing something with them. Instead we can encapsulate this read…
    Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now