Solved

#Region missing in vb.net 2005

Posted on 2007-03-22
3
848 Views
Last Modified: 2010-07-27
With VB.net 2003 I used to be be able to copy a form just by selecting all the code and pasting it in a new project.  In vb.net 2005 The #Region " Windows Form Designer generated code " doesn't seem to exist in any new project I create.  This is the section where all the controls were defined.  This ability was great since you could just email some code to someone and they just could paste it in a new project and the form was completely designed with support code.
I don't want to have to manually design the form again.  Can this be turned back on in vb.net 2005?
0
Comment
Question by:Pber
3 Comments
 
LVL 7

Accepted Solution

by:
dctuck earned 350 total points
ID: 18771198
This is all placed in a seperate file now. You have to click on the "Show All Files" icon in the Solution Explorer (second from left), and then expand the form you want to display the code for. There will be a file named Form.Designer.vb, which contains that information...
0
 
LVL 62

Expert Comment

by:Fernando Soto
ID: 18771232
Hi Pber;

In VB .Net 2005 they split that into two files. If you goto Solution Explorer window and click on the Show All Files button at the top of the window then click on the + sign next to the form you want to copy you will see some more files as sub nodes to the file.

For example if the form you are looking for is Form1.vb then as a sub node you will find a file called Form1.Designer.vb which holds all of the code that was in #Regions in VB .Net 2003.

Fernando
0
 
LVL 26

Author Comment

by:Pber
ID: 18772170
That definetely makes it tougher to transport, but thanks for the solution.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

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

11 Experts available now in Live!

Get 1:1 Help Now