Solved

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

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How do ASP.NET and MVC work together? 4 29
SSL https .net web site force redirect 3 37
Convert an ASPX page into PDF 7 25
Web Form VB.Net  import CSV 4 26
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

895 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

16 Experts available now in Live!

Get 1:1 Help Now