Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Everything Disappeared!

Status
Not open for further replies.

zatch

MIS
Joined
Oct 11, 2001
Messages
75
Location
US
I have a form with many controls on it. All of the sudden, no controls are visible on the form except for the Menu. Completely blank otherwise. It looks like the code is still there for all of the controls, and all of the controls are available in the Properties Window but missing from the form. When I run the project it is also blank!

Has this ever happened to anyone? How can it be fixed?

Thanks.
Zatch
 
yep several times. A couple of things to check

isn't there a panel that is in the forground blocking everything from sight. Remedy click on and send to back.

Check the code to see every control is mentioned twice.
once like this

dim textbox1 as textbox

and a little later like this

textbox1 = new textbox

or something similar.

BTW what happens if you add a new control.

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
Thanks for your reply.

No panel sitting on top.
Each control seems to be declared properly.

I added a button to the form and it shows up fine.
I then copied all of the code in the "Windows Form Designer generated code" section and pasted it into a new form. The new form showed up exactly like the current one - the only things visible were the top menu and the new button that I just added. It made itself the right size and everything, it just doesn't show anything but those two controls.

Any other ideas?

Thanks again.
Zatch
 
What I had to do was, make a copy the resx file to some other folder and then delete the resx attached to the form, do a Full Build and re-open the form in IDE again. This recreates the resx file automatically and that fixed it for me.

To see resx in Solution Explorer, select the project and then click "Show All files" icon in Solution Explorer toolbar. Go to the form that has the problem and click on the plus sign to view resx file.

-Kris
 
I copied the resx file in Windows Explorer and placed the backup on my desktop. Then, I deleted the resx file. I did a build on the solution. When I try to open the form, I get an error message: "The item 'frmHRA.resx' does not exist in the project directory. It may have been moved, renamed or deleted." What process is supposed to rebuild the .resx file?

Thanks.

Zatch
 
try a rebuild instead of a build.

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
I copied/deleted the .resx file within the Solution Explorer this time instead of Windows Explorer. I did a rebuild and the .resx was recreated. It was recreated without all of the controls, though.

Did I do something wrong?

Thanks.

Zatch

 
Nope, that is what I used to do and it used to put back all the controls for me. Just open the resx file in IDE and see if you can see all the control names in it. It should list all your controls names in there. Is this a form inheriting any other base forms?

-Kris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top