How to avoid automatic Designer (VS2005) rewriting InitializeCompo

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I wish to include one simple in InitializeComponent, that would not
compromised this function any way. But VS 2005 Designer sometimes automaticly
rewrites InitializeComponent, and remove my code.

Any suggestion how to disable VS 2005 designer to do this?

Thanks
Milan
 
Do not include any of your code in this method! This method is autogenerated
by VS 2005 and if you modify this, this could break the design
functionnalities of VS.

Add your code in the constructor of your form if you need some other stuff
in the initialisation of the form.

Steve
 
I know for all of that, and because of this reason I asked question, how to
avoid problem!
Any suggestion...

Thanks
 
Read again my post... I suggested you to add something in the constructor of
the form...
You may explain what your are trying to do. That should help us to
understand your problem and try to solve it.

Steve
 
I wish to replace second line in Form InitializeComponent:
System.ComponentModel.ComponentResourceManager resources = new
System.ComponentModel.ComponentResourceManager(typeof(MdiForm));

with my own contstructor of resources, and use all other lines in
InitializeComponent where is used ApplyResources and other regarding
resources.

But I found namespace System.ComponentModel.Design where user can add custom
steps...

I hope, I will complete aim with this namespace.

Thanks
Milan
 
Back
Top