lost my form !!!!

sethindeed

Centurion
Joined
Dec 31, 1969
Messages
118
Location
Montreal Canada
My form disapeared !!!
All the controls on it went away ! The code is still there but the UI is gone !!!
Anybody experienced this problem before ?!?!
Please help me :(
 
Wow, three others had the same problem this week.

Did you change anything in the Autogen portion of the code?
Is this ASP or Windows Forms?
 
Check your InitializeComponent() procedure to make sure the code is all still there... Another user had that same problem and it turned out that somehow the code was deleted. If possible, you would need to copy it over from a backup. If it is there, maybe somehow it was corrupted? Take a look at it for obvious errors or maybe post it here....
 
My two cents

I copied some procedures by myself instead of clicking on a component to code procedures.

I think that we have to proceed very carefully when assigning code to controls...We just can't go like we were used to in VB6...Anyway, I am now back at the point I was ( rebuilding the project and starting a new form from scratch, because even if you are retyping the code in the empty form shown after the data lost, it is corrupted )
 
What I've usually seen is that not ALL the code in InitializeComponent is gone, just the few lines that reference the current form (Me in VB.NET or this in C#). In particular, the line that adds all the control to the form (sonething like this.Controls.AddRange(...)) is missing. Without this line, .NET won't know to add the controls to the form. So even though all other code is there, including creating controls, the form won't render any of them.

-Ner
 
Back
Top