Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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 :(

What I don't know keeps me excited...
Posted
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....

mov ax, 13h

int 10h

Posted

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 don't know keeps me excited...
  • *Experts*
Posted

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

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...