Solved

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

Posted on 2008-09-30
5
2,171 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
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

708 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

17 Experts available now in Live!

Get 1:1 Help Now