Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to fix broken winform designer?

Posted on 2009-02-17
4
Medium Priority
?
1,626 Views
Last Modified: 2013-11-26
In VS.NET 2008 (.NET 3.5), someone renamed a button in the designer auto gen'd code.  Everything builds and works fine except the designer.  When you open the designer in vs.net, if gives an error:

The type 'System.Windows.Forms.UserControl' has no property named 'TheNewButtonName'.

If I name the button back to the old name, it still gives the error.  Is there a way to fix this?
0
Comment
Question by:brettr
  • 2
4 Comments
 
LVL 26

Accepted Solution

by:
Anurag Thakur earned 2000 total points
ID: 23666365
create a new form and then copy the controls from the designer and past them to the new form - i hope that the form is still opening in the designer mode

else

does your user control "System.Windows.Forms.UserControl" has the property 'TheNewButtonName'
if not then remove or comment the line in which 'TheNewButtonName' is there
search for 'TheNewButtonName' and comment the line
0
 
LVL 15

Expert Comment

by:angus_young_acdc
ID: 23669995
Have you tried doing a Clean on the solution?  I normally find that works.
0
 

Author Comment

by:brettr
ID: 23717451
I had delete the button in question.  The designer came back.  Then I added a new button and set the property.  I don't see how the above solutions apply.  Unless someone says otherwise, I'm going to close the question.
0
 
LVL 15

Expert Comment

by:angus_young_acdc
ID: 23719515
From what I can see that was ragi0017's suggestion about removing the button.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Suggested Courses

580 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