Solved

#Region missing in vb.net 2005

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

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

756 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