Solved

Turn off separate Designer file for Forms/UserControls

Posted on 2006-10-21
8
229 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

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

623 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