Solved

Turn off separate Designer file for Forms/UserControls

Posted on 2006-10-21
8
190 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 10

Expert Comment

by:Kinger247
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 48

Expert Comment

by:AlexFM
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now