Solved

VS 2005 Disappearing Namespace Region

Posted on 2006-11-01
3
255 Views
Last Modified: 2010-04-23
I'm trying to settle into using VS2005 coming from VS2003 (yes, I know I'm late).  I've noticed that no matter what I try, I cannot get access to that specific region in any VB.NET form (or ASP.NET page for that matter) where the controls are declared private, protected, public, withevents, etc.  This area also gives me access to making any changes to the namespace that I wish.  Can someone tell me exactly how to bring this region back into view?  The reason I ask is that I had an image button yesterday that somehow got pooched and I could not build the form because VS kept telling me "WithEvents" was not declared.  I ended up having to remove the button, save and close the project, reopen the project and add the button again.  Annoying!  Thanks!
0
Comment
Question by:Mister Porsche GT3
[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 Comments
 
LVL 34

Accepted Solution

by:
Sancler earned 75 total points
ID: 17849828
In Solution Explorer, click Show All Files.  On tree, click "+" by form concerned.  Double-click on <formname>.Designer.vb

Roger
0
 
LVL 6

Assisted Solution

by:Jayadev Nair
Jayadev Nair earned 50 total points
ID: 17849832
Hi

Like 2003, Windows generated code is not in a specific region inside yourCode.vb. Instead it is in another file which is declared as a Partial Class of a your original Class. Partial Class is a new feature in 2005 and it is very helpful to divide and place your code in several files writing

Public Partial Class MyCode

End Class

So, to find the region, look into YourCode.designer.vb file which will be right in the directory where your actual form class exists. In visual studio, if you donot find that file - Click Show Hidden Files option on top of solution explorer dock window. This will show a + symbol on your form. Expand it and there you will find designer.vb file and also .resx of your form. In 2005, a form class will have three files. Form1.VB (where you code), Form1.designer.vb(designer code) and Form1.resx (your resources). But please be careful while editing the designer code. :)

Thanks.
0
 

Author Comment

by:Mister Porsche GT3
ID: 17850696
Cool, that worked for VB.  I am having a problem replicating that result in ASP.NET -- is it something close?  The "show all files" in ASP is grayed out.
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
vb.net winforms sizing/resolution? 4 56
SSRS 2016 Rendering HTML tables 3 61
Visual studio 2015 1 35
vb.net datagrid point 4 22
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
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…

733 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