?
Solved

VS 2005 Disappearing Namespace Region

Posted on 2006-11-01
3
Medium Priority
?
261 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 300 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 200 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

771 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