Solved

#Region missing in vb.net 2005

Posted on 2007-03-22
3
856 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
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…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

910 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

22 Experts available now in Live!

Get 1:1 Help Now