How to put all code generated by the designer in external files (VS2005) ?

P

pamelafluente

Don't know if this is a common or dumb question (just playing with the
2005)...

When one imports a project in VS2005, I noticed that for the existing
controls the code generated by the Designer remains in the main file,
while the *new* controls, created with the new IDE, use an external
file (along with resx).

Is there a simple way to tell the IDE to process the controls and put
the Designer code in an external file *for each* control and form ?

I dont' like the idea of having 2 standards, and actually having the
code in an external file does seem a good and useful idea.

Thank you.

-Pam
 
C

Cor Ligthert [MVP]

Pam,

There is no standard method. After some thinking I found it and advanctance.

Now you can leave it as it is and as you are well done in Net 2.0 recognise
the parts which where not original 2.0 and than refactor those including
adding the partial class.

(The RESX is by the way as well in 1.x)

I hope this helps,

Cor
 
P

pamelafluente

Thank you Cor. I am a little disappointed to hear that, by, on the
other hand, I am really conforted to understand that you think that
having all in one file can be an advantage.
But, if this is so, please, may I make the inversion question?

Can I tell VS2005 IDE to put the designer code together with the user
code when a new control/form is created? Is there an option?

Thank you very much, you are always so helpful,

-Pam

PS
By the way, the new IDE is really an improvement!

Cor Ligthert [MVP] ha scritto:
 
C

Cor Ligthert [MVP]

Pam,

I wrote it probably wrong.

I like the way VB2005 does it. (partial classes)

However that it is not direct converted is for me an advantage.

Now I can see what comes from 2003 and as soon as I know 2005 very well.

Than I can still see which are old VB2003 parts and make them in the way as
VB2005, but than as well have a good look what I can make better.

Cor
 
P

pamelafluente

Thank you Cor. Now I understand what you mean. Actually I have a
feeling slighly different from yours (but it may be unreasonable): from
the moment I choose to migrate to 2005, I would like the whole project
be "uniform". Clearly, we are not talking about anything really
important here. It's more a question of style than an essential one,
although perhaps some slight problem could arise with Find/Replace
operations (I don't know yet).

At this point, let's hope that someone comes out with a nice idea or an
utility to do this task (make all controls uniform as to "storage
style"). If anyone does please let me know: I will be the first
downloader !!

Thank you Cor for your kind answers and information.

-Pam
 

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