Content by Category
.NET 1.x
.NET 2.0
.NET 3.0
.NET 3.5
.NET 4.0
.NET 4.5
.NET Assemblies
.NET Framework
.NET Getting Started
Accessibility
ADO.NET
Advertorials
Agile Development
AJAX
Amazon Web Services
Analysis Services
Android
Architecture
Arduino
ASP .NET Web API
ASP.NET
ASP.NET MVC
ASP.NET WebForms
Azure
B2B (Business Integration)
BDD
Big Data
Bing
BizTalk
Book Excerpts
Build and Deploy
Business Intelligence
C#
C++
ClickOnce
Cloud Computing
Code Contracts
CODE Framework Info - non Technical
CODE on the Road!
COM+
Community
Conferences
Continuous Integration
Crystal Reports
CSLA.NET
CSS
Data
Debugger
Design Patterns
Development Process
Display Technologies
Distributed Computing
Document Database
DotNetNuke
DSL
Dynamic Languages
Dynamic Programming
Editorials
Enterprise Services ("COM+")
Entity Framework
Events
Expression Blend
F#
Fox to Fox
Frameworks
Functional Programming
Git
Graphics
HTML 5
Internet Explorer 8.0
Interviews
IOS
iPhone
Iron Ruby
Java
Java Script
JavaScript
jQuery
JSON
Lightswitch
LINQ
Linux
LUA
Mac OS X
MDX
Messaging
Metro
Microsoft Application Blocks
Microsoft Business Rules Framework
Microsoft Dynamics
Microsoft Expression
Microsoft Office
Mobile Development
Mobile PC
Mono
MsBuild
MVVM
MySQL
Network
NHibernate
node.js
NOSQL
Nuget
Object Oriented Development
Objective C
Odata
OLAP
Open Source
Opinion
Opinions
Oracle
ORM
Other Languages
Parallel Programming
Patterns
PHP
Podcasts
Post Mortem
PowerPoint
Print/Output
Prism
Product News
Product Reviews
Project Management
Prolog
Python
Q&A
Rails
Rake
Razor
Reporting Services
REST
RIA Services
Ruby
Ruby on Rails
Scheme
Search
Security
Services
SharePoint
SignalR
Silverlight
SOA
Social Networks
Software & Law
Software Business
Source Control
Speech-Enabled Applications
SQL Server
SQL Server 2000
SQL Server 2005
SQL Server 2008
SQL Server 2012
SQL Server CE/AnyWhere/Mobile/Compact
SSIS
Subversion
Sync Framework
Tablet PC
TDD
Team System
Techniques
Testing and Quality Control
TFS
Tips
TypeScript
UI Design
UML
User Groups
VB Script
VB.NET
Version Control
VFP and .NET
VFP and SQL Server
Virtual Earth
Vista
Visual Basic
Visual Basic 6 (and older)
Visual FoxPro
Visual Studio .NET
Visual Studio 11
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010
Visual Studio 2011
Visual Studio 2012
Visual Studio Tools for Office
VSX
WCF
Web Development (general)
Web Services
WebMatrix
WF
Whitepapers
Windows 7
Windows 8
Windows Azure
Windows Live
Windows Phone 7
Windows Phone SDK
Windows Server
Windows Vista
WinForms
WinRT
Workflow
WPF
XAML
Xiine Documentation
XML
XNA
XSLT



LearnNow


XAMALOT
 


SSWUG

Reader rating:
Article source: CoDe (2007 Sep/Oct)

Ask the Doc Detective


Doc Detective

Finding what you need in the Microsoft® Visual Studio® 2005 documentation, which has over 200,000 topics, can be a daunting task. The Doc Detective is here to help, utilizing his investigative skills to probe the depths of the documentation.

Can’t find what you’re looking for? Just ask-if it’s in there, I’ll find it for you; if it isn’t, I’ll let you know that as well (and tell you where else you might go to find it).

Have a question for the Doc? Send your questions for future columns to me at docdetec@microsoft.com.

Dear Doc Detective,

I wonder if you can help. The Visual Studio documentation mentions that output of an XML documentation file can be enabled on the project property pages by setting the XML Documentation File property. However, for an ASP.NET Web site, there is no such property available on the property pages. Where/how can I set this property for an ASP.NET Web site (file or Web-based) in Visual Studio 2005?

- Missing in Mississauga

Dear Missing,

The Visual Studio documentation does indeed state that, but in this case it appears to be wrong. The XML Documentation File property only applies to Windows applications, class libraries, and console apps.

There is, however, a trick you might try. Assuming that your code is in a .cs file, you should be able to generate the XML documentation file by compiling the file via the command line compiler using the /doc compiler option. The compiler isn’t smart enough to know that your code file came from a Web project, or maybe it just doesn’t care.

- Doc D

Dear Doc Detective,

I am creating a custom user control. Initially, the UserControl has its default properties, methods, etc. I would like to remove some properties that are not needed for my control, and add some that are needed.

I have been able to successfully add some properties, but the added properties always show up on the property page under the "Misc" category. I would like them to show up under the "Layout" category.

So, my question is: How do I add properties to a specific category of the properties, and how do I remove unneeded properties and methods?

--Disorganized in Douglasville

Dear Disorganized,

If I’m counting correctly, that would be two questions-and they are both good ones. I’ve always wondered how this was done, so I rolled up my sleeves and dug into the docs.

It turns out that there are a couple of attributes that you can apply to your properties-Browsable determines whether a property will be shown in the Properties window, and Category determines where they are placed-you can even create your own section. There is an example of this in the topic "Walkthrough: Creating a Windows Forms Control That Takes Advantage of Visual Studio Design-Time Features". Look in the “To create a child control for your custom control” section, step 11.

As for hiding properties, it depends on where they are coming from. If you are creating a composite control, you decide which properties of the constituent controls you want to expose. To learn more, see "How to: Expose Properties of Constituent Controls".

If you are inheriting from UserControl and the properties that you want to hide are Overridable, you should be able to override them in your class and use the Browsable attribute to hide them. Another alternative would be to wrap your control in another User Control, essentially making it a composite control, and then exposing only the properties that you want.

- Doctor D

Dear Doc Detective,

I want to use the same icon for my application (the one that shows up in the Start menu) and for each of the forms in my app (the ones that show up in the Taskbar). I added the icon to my project in the Project designer, but when I try to add it to the form via the SystemIcons.Application property the forms show a different icon.

Surely there must be a way to reuse my application icon in my forms. Where did I go wrong?

- Wondering in Waycross

Dear Wondering,

You probably went wrong by not carefully reading the reference documentation. The topic for the SystemIcons.Application property states that it returns "An Icon object that contains the default application icon." Note the word "default" -what you are seeing is the default Application Icon that Visual Studio uses if you don’t specify your own.

There is no way to directly set a form’s Icon property to the Application Icon that you set in the Project Designer. You can, however, use a single icon for both your application and your forms by adding the icon as a resource, as described in the topic "How to: Add or Remove Resources".

Once you’ve added it, in the Project Designer choose your icon from the drop-down list for "Application Icon". To set the form icon for each form you would add the following code in each form’s Form_Load event:

Me.Icon = My.Resources.myReallyCoolIcon

The lesson learned here is: it pays to be resourceful!

- the Doc

Doc’s Doc Tip of the Day

Ever notice that sometimes when you press F1 in the Code Editor you get the wrong result? A reader reported a discrepancy when trying to get help on File.Open-placing the cursor on the word Open and pressing F1 brought up the right topic, but highlighting Open and pressing F1 brought up a SQLConnection.Open topic.

While this behavior may seem odd, it’s actually by design. The F1 logic looks at the current position of the cursor, then uses that word and any surrounding words to establish context, then it does the F1 lookup.

If you highlight the word, it doesn’t look for context-it just finds the first instance of that keyword and displays the topic. In this case, the SQLConnection.Open topic has a higher priority than the File.Open topic, so it was found first.

If you highlight both File and Open, it “might” have enough context to find the right topic, but if there is more than one File.Open topic you may still get the wrong one. Bottom line: Don’t highlight the keyword and you’ll be fine.

Found a topic in Help that doesn’t help? Tell the Visual Studio documentation team about it at vsdocs@microsoft.com.

URLs

http://msdn2.microsoft.com/en-us/library/3260k4x(VS.71).aspx

http://msdn2.microsoft.com/en-us/library/system.componentmodel.browsableattribute(vs.71).aspx

http://msdn2.microsoft.com/en-us/library/system.componentmodel.categoryattribute(vs.71).aspx

http://msdn2.microsoft.com/en-us/library/35ea88wb(VS.80).aspx

http://msdn2.microsoft.com/en-us/library/02a1w7dy.aspx

http://msdn2.microsoft.com/en-us/library/3bka19x4(VS.80).aspx


How would you rate the quality of this article?
1 2 3 4 5
Poor      Outstanding

Tell us why you rated the content this way. (optional)

Average rating:
4.2 out of 5

5 people have rated this article.

Instantly Search Terabytes Of Text
“Lightning Fast”
– Redmond Mag
“Covers all data
sources” – eWeek
25+ fielded & full-text search options
dtSearch’s own document filters highlight hits in popular file types
Web Spider supports static & dynamic data
APIs for .NET, Java, C++, SQL, etc.
Win / Linux (64-bit & 32-bit)
www.dtSearch.com
 

      LearnNow

 

SSWUG