Solved

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

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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

756 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