Lost code, references still there???
OK, this stinks. I lost about 85% of my project. I don't know how, but most of my dropdowns, labels, buttons and text fields are gone along with the code that was attached to them.
Now, after I beat myself up for not using SourceSafe I sat down to start redesigning my app. As I drew the first dropdown and renamed it a message box popped up and informed that I could have 2 objects with the same name.
When I look at the code I see Protected WithEvents...and the names of all the controls I lost (and some that are still their)
I don't remember if this was there before (I'm not familiar with .net and kinda ignore all the code it enters by itself, hence my problem). Should I just delete all of this WithEvents stuff or should I just scrap the whole project and start brand new?
Thanks!!!
Re: Lost code, references still there???
Quote:
Originally posted by Criki
OK, this stinks. I lost about 85% of my project. I don't know how, but most of my dropdowns, labels, buttons and text fields are gone along with the code that was attached to them.
Now, after I beat myself up for not using SourceSafe I sat down to start redesigning my app. As I drew the first dropdown and renamed it a message box popped up and informed that I could have 2 objects with the same name.
When I look at the code I see Protected WithEvents...and the names of all the controls I lost (and some that are still their)
I don't remember if this was there before (I'm not familiar with .net and kinda ignore all the code it enters by itself, hence my problem). Should I just delete all of this WithEvents stuff or should I just scrap the whole project and start brand new?
Thanks!!!
All of those WithEvents stuff, are your controls. All of the code in the 'Windows Forms Designer Generated Code' area is real VB.NET code that you can write and modify yourself if you want, not some IDE-dependant stuff.
All of those declarations that have 'Withevents', those are nothing more than normal variable declarations that represent all of your controls on the form. If those declarations are still there, you still have your contros. My guess is that they've been moved off of the edge of the form. Check the form's properties window, and there should be a drop-down list box that would list all of the controls on your form. If the controls are listed, maybe you can just expand the form so you can see your controls, then drag them all at once to where they should be.
Just a guess, but from what your telling me, the controls are still there. If thats the case, then there isn't much that needs to be done to fix this problem.