473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

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

Mar 2 '06 #1
4 1293
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

<pa***********@libero.it> schreef in bericht
news:11**********************@t39g2000cwt.googlegr oups.com...
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

Mar 2 '06 #2
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:
Pam,

There is no standard method. After some thinking I found it and advanctance. .... (The RESX is by the way as well in 1.x)

I hope this helps,

Cor

<pa***********@libero.it> schreef in bericht
news:11**********************@t39g2000cwt.googlegr oups.com...
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


Mar 2 '06 #3
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
Mar 2 '06 #4
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

Mar 2 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: edster | last post by:
A *lot* of our teams code is being deleted from the InitializeComponent() section of a winform, such as Grid settings, event handler hooks, layout settings etc. This mainly seems to happen to 3rd...
2
by: -DG- | last post by:
No reply on my previous query, so I'll post this again. I've done a bit more research in the interim. I'm trying to find an easy way to port code from the older VS2003 format to the format used...
17
by: tshad | last post by:
Many (if not most) have said that code-behind is best if working in teams - which does seem logical. How do you deal with the flow of the work? I have someone who is good at designing, but...
2
by: dbuchanan | last post by:
I built a simple Data Access Layer with the Visual Studio 2005 DataSet Designer using the wizard. All who I have talked to who use it, articles I haver read by those who use it speak very highly...
5
by: Fredrik Melin | last post by:
2005 uses the Partial Class & <form>.Designer.vb for its "windows forms generated code" Anyone know if its faster/better then old 2003 way? Also, when upgrading a 2003 project it did not...
2
by: Marty Cruise | last post by:
Why is it that when I remove some lines of code within the "Windows Form Designer generated code", it regenerates itself when I save the form? I understand that I'm not supposed to modify code...
6
by: cj | last post by:
Lets just take this example I'm looking at now. I'm looking at the help screen titled .NET Framework Class Library FolderBrowserDialog Class . It gives an example at the bottom that begins with:...
2
by: JB | last post by:
I have existing aspx pages that I'm editing in VS 2005 that I add a server control to - like a label. I include the runat="server" and it doesn't seem to create the reference in the code behind for...
7
by: Nathan Sokalski | last post by:
I am an ASP.NET developer, and Visual Studio 2005 seems to have stopped declaring the controls that I add in the *.designer.vb files, therefore forcing me to manually add them before I can use them...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.