Solved

Turn off separate Designer file for Forms/UserControls

Posted on 2006-10-21
8
217 Views
Last Modified: 2008-03-10
Does anyone know how to turn off the separate .Designer file that VB.NET generates when you create a new Form/UserControl?

e.g.
frmMain.vb
 |- frmMain.Designer.vb

I actually prefer having it all in one file so I can make changes to the code quickly without having to expand the tree & open the file in Solution Explorer.

Chris
0
Comment
Question by:khooc
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 13

Expert Comment

by:newyuppie
ID: 17783104
i think it was on 1 file in studio 2003. in 2005, it separates everything. actually you grow used to it, its cleaner to have the initialization code for the form apart from your main code.
0
 
LVL 10

Expert Comment

by:Kinger247
ID: 17783863
Are you asking how to hide the designer file ?

if so : Toggle the "Show All files" button located above the soltions explorer tree.

but then I think you already know that ?  
So what are you asking ?   :)
0
 

Author Comment

by:khooc
ID: 17783989
In 2003, they used to integrate the whole lot into one file.

Now the designer code is out of the way to a separate .Designer file via a partial class :-( which I don't particularly like.

I actually preferred it all in one file, which makes it easy for me to make designer code changes without having to 'Show All Files' and open the Designer file.

Chris
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 10

Expert Comment

by:Kinger247
ID: 17784044
The thing is for people learning vb.net, the code which is commented as 'do not change' should not be with the user code.
But after a while I ended up changing the code there quite often.
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 17784443
VB 2005 designer supports forms developed in VB 2003. This means, you can manually copy designer-generated code from frmMain.Designer.vb to frmMain.vb - do this exactly like VB 2003 designer did. Then remove frmMain.Designer.vb file.
0
 

Author Comment

by:khooc
ID: 17838707
Hmm I was wishing there was a way it would do this automatically when I add a new form to the project. :-(
0
 
LVL 48

Accepted Solution

by:
AlexFM earned 250 total points
ID: 17840303
Most developers think that moving designer-generated code to seperate file is convenient. But this is personal preference. Other way to open designer file from class view is to select some function from it, like InitializeComponent or Dispose.
0
 

Author Comment

by:khooc
ID: 17863235
Hi AlexFM

Hmm, I guess given the situation, you have answerd the question as best as can be answered - so you get the points.

Chris
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Convert an ASPX page into PDF 7 36
VB.NET 2008 Populate DataModel with DataTable 44 38
Optimize the query 5 42
Open a link in vb.net 2 15
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question