Solved

VB .NET: Cannot open a form in design view.

Posted on 2008-09-30
5
2,257 Views
Last Modified: 2013-11-26
For some reason my "main" form in one of my Windows Forms applications will no longer open in design view. I haven't edited it recently so I don't know why.

When I run the application everything is fine but trying to open in design view makes Visual Studio hang and eventually (after lots of noise from the CPU) I get the "Send Error Report" message.

Has anyone any hints on how to fix this?
0
Comment
Question by:milesryoung
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 3

Expert Comment

by:DigitalSnorkle
ID: 22604681
It's hard to say without knowing more about the project, but there are a couple of things you could try:

1. Make sure theres no possiblity of an infinate loop in the page or anything it triggers.

2. Make sure you have appropriate timeouts set on any external connections (eg. to databases) so that they fail with an error rather than waiting indefinately.

3. Make a backup of the file(s) someone else, delete the problem file from the VS project and try to build (almost certain to fail).
Add you backup back into the project.  This will discard any stored any stored metadata and make VS review the file from scratch.
0
 
LVL 27

Expert Comment

by:VBRocks
ID: 22605478
You can also try Cleaning your Project, then Building it again.

    Build menu | Clean Solution
    Build menu | Build Solution

0
 

Accepted Solution

by:
milesryoung earned 0 total points
ID: 22719197
One of my own component controls was causing the error but thanks to all!
0
 
LVL 1

Expert Comment

by:agoud
ID: 26849048
This problem happened to be before (and now). I don't remember what I did before, but just now, I simply went onto the form designer code and changed PARTIAL CLASS to PUBLIC CLASS (enter) and then PUBLIC back to PARTIAL.... and the form came back (I was able to see it in the designer and edit it.
0
 
LVL 1

Expert Comment

by:agoud
ID: 27652906
In addition to my comment above. Before doing this (I simply went onto the form designer code and changed PARTIAL CLASS to PUBLIC CLASS (enter) and then PUBLIC back to PARTIAL.... and the form came back (I was able to see it in the designer and edit it.) I created a new form (which also showed in the designer) and then did the above.

i.e.,
Create a completely new form and view it in the designer, then you can rename all PARTIAL CLASS to something else (e.g. PARTIALTEMP Class) and then rename back to PARTIAL CLASS. In this way they all became editable.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

740 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