Solved

Turn off separate Designer file for Forms/UserControls

Posted on 2006-10-21
8
226 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

752 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