Solved

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

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

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…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

628 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