Question Form not displaying controls

tknight

Member
Joined
Sep 20, 2010
Messages
7
Programming Experience
Beginner
Hi,

I am working on a Win Forms App in VS2008 Express and gradually the project started having problems building. It would throw up a message - something like "Build cannot be completed" even though there were no compile errors. If I closed the project and re-opened it the build would work ok. It was a bit annoying but I persevered with it and then all of a sudden one of my main forms just went blank. I checked the designer.vb file and all the objects are there, but they just won't display on the form (either when designing or during run-time). I googled it and some people have had similar issues but usually with all forms not just one. I rebooted, tried to create new vb files for the affected form (copying the code into the new form) but nothing seemed to sort it.

I will get our network Admin to restore the project from a backup and can hopefully copy the old form back into the project but has anyone had this before, or got any suggestions as to how I might fix it?

I would post my designer.vb code but i'm not at the office at the moment.

Any ideas would be much appreciated.

Cheers,

Tom
 
Does this just occur with one specific form in one specific project, or is it other projects too? Something has become corrupt somewhere, whether it's in your VB Express installation or your project. When I get a form going haywire like that, I usually add a dummy project to my solution and then drag the form into it in the Solution Explorer. This regenerates the form resources somehow and generally seems to fix the issue. Once I'm happy that the form is working, I delete the original and drag the copy back again. I've done this a few times over the years and it's always worked for me, although it obviously depends what the actual problem is.
 
It is just one form in one project that has gone like that. I will try your solution and fingers crossed it resolves the issue.

Thanks for the tip... will let you know

Tom
 
Back
Top