How to avoid automatic Designer (VS2005) rewriting InitializeCompo

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
 
S

Steve B.

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
 
G

Guest

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

Thanks
 
S

Steve B.

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top