Solved

VS 2005 Disappearing Namespace Region

Posted on 2006-11-01
3
258 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
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 …
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

691 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