I have a migrated project from VS2003. In severals forms, and in random cases
the designer displays this error:
"The designer cannot process the code at line 109: Me.button1 = New
System.Windows.Forms.Button The code within the method 'InitializeComponent'
is generated by the designer and should not be manually modified. Please
remove any changes and try open the designer again"
In fact I only work with the form trough the designer, not in the code editor.
If I look the code I can see that the designer removes the object definition:
"Friend WithEvents Button10 AS System.Windows.From.Button"
If I add this line manually, save the file, close and open the form it
displays right!!!
The problem is that the editor remove several lines of buttons, menubars,
etc...
Every time, or several times, I change a property of a control, for example
image, the code crashes.
I use the VS 2005 V8.0.50727.42 (RTM.050727-4200)
Help needed!!!!
Thanks and sorry for my bad English!
> I have a migrated project from VS2003. In severals forms, and in random cases
> the designer displays this error:
[quoted text clipped - 22 lines]
> Help needed!!!!
> Thanks and sorry for my bad English!
I've just had an identical set of errors, but the circumstances are
slightly different:
I'm copying files from an existing solution into a new project
structure (C#). On *some* screens, when I attempt to design the screen,
the designer can't be opened, but the identical screen still opens,
designs and compiles in the original project.
At no point have a I attempted to change the designer-generated code
manually.
The solution in my case was:
1) Add the form to the project - do *not* open it in the designer
2) Right-click on the form in the Solution Explorer, and click on "View
Code". Don't change anything.
3) Close the project, saving any changes if prompted
4) Re-open the project - the form can now be designed - if you're
lucky.
In some case, I can miss out step 3 and half of step 4, i.e. you can
design the form straight after viewing the code.
Juan Segura - 24 Jan 2006 12:03 GMT
I'm not alone in the universe!!!
The forms works until I change the image property, then the editor removes
lines randomly.
My solution is to restore this single lines, sometimes several, from the
backup for not to lose the new work.
I thinks this IDE is so special!!!
Thanks for your coment!
> > I have a migrated project from VS2003. In severals forms, and in random cases
> > the designer displays this error:
[quoted text clipped - 48 lines]
> In some case, I can miss out step 3 and half of step 4, i.e. you can
> design the form straight after viewing the code.