Finding what you need in the Microsoft® Visual Studio® 2008 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

Dear Doc Detective,

I have an application that needs to run on both 32-bit and 64-bit platforms, and I’ve run into a problem. The application needs to display a PrintDialog, and the following code works fine in the 32-bit version, but on 64-bit the dialog isn’t displayed and no exception occurs.

Dim pd As New PrintDocument()
Dim prtdlg As New PrintDialog()
prtdlg.Document = pd

I can’t find anything about this online-any idea what’s going on here?

- Printless in Princeton

Dear Printless,

I’m not surprised that you can’t find the information on this issue-it is indeed documented, but it definitely falls under the category of "fine print." If you look at the topic "PrintDialog.UseEXDialog Property", buried way down under the Remarks is the following sentence: "Also, the PrintDialog class may not work on AMD64 microprocessors unless you set the UseEXDialog property to true."

If you add the following line to your code, it should work just fine on your 64-bit platform:

Prtdlg.UseEXDialog = True

Given that the main purpose of the UseEXDialog is to set the Windows XP style, it certainly isn’t obvious that this property would have anything to do with your issue. Even if you had found this tidbit of information, the topic is incorrect in that it states that the default for UseEXDialog is True when in fact it is False.

- Doc D

Dear Doc Detective,

We are doing some work with Visual Studio Tools for Office in VS 2005 and having a hard time finding info. Any time we look up something, we keep getting Visual Studio 2008 info. Is there a trick to finding info on VSTO for VS 2005?

--Time-warped in Tallahassee

Dear Time-warped,

The MSDN Online Library contains documentation for multiple versions of Visual Studio and Visual Studio Tools for Office. If you drill down under the Development Tools and Languages node in the Table of Contents, you will see that there are separate nodes for Visual Studio 2008 and Visual Studio 2005.

Expand the Visual Studio 2005 node and you will see a node for Visual Studio Tools for Office-this is where the 2005 versions of the docs reside.

If you come across a VSTO 2008 topic via search, you can always use the "This page is specific to" box near the top of the topic to jump to the 2005 version.

In addition to the VSTO 2005 docs, there are a number of helpful technical articles specific to 2005 under the Office Development node in the Table of Contents. Then again, you can always upgrade to 2008...

- Doctor D

Dear Doc Detective,

I’ve written an add-in for Visual Studio that acts as a repository for some of my frequently used code. I would like to add entries to the context menu in the code editor to access the add-in as I write code.

How do I access an existing context menu in Visual Studio to add my own command? I don’t have a clue where to start.

-Clueless in Clemson

Dear Clueless,

Obviously you are already familiar with the Visual Studio SDK, having already created an add-in package. The documentation for the SDK is constantly being updated, and among the recent updates is a walkthrough that should get you going.

Just look for "Walkthrough: Implementing a Shortcut Menu in a Tool Window" in the "Menus and Toolbars" section of the docs.

For those that are new to Visual Studio SDK development, a good place to get your feet wet is the set of tutorials aptly named "Tutorials for Customizing the Visual Studio IDE."

- Doc D

Dear Doc Detective

I am using a DataRepeater control to display order information in an application, binding the controls to a SQL database. This works fine for most controls, however I am having a problem with a unbound ListBox control.

The ListBox should display a list of valid shipping methods, which it does in design view. When I run the application, the ListBox is empty. What am I doing wrong?

- Listless in Lincoln

Dear Listless,

The DataRepeater just isn’t that smart. At run time, it attempts to replicate the controls that you put on the ItemTemplate at design time. For the most part it works, but it gets confused by some of the more complex properties such as the Items collection.

Fortunately you can help it out by adding your own code in the ItemCloned event to "fix up" the properties that the cloning process missed. The code in this event will be run for each item as it is scrolled into view.

The topic "DataRepeater.ItemCloned Event" contains a code example that shows how to repair the Items collection at run time.

- the Doc

Doc’s Doc Tip of the Day

Tired of searching the docs for something and having to sift through 500 irrelevant results? You can create more targeted searches that return only those topics you are interested in by understanding how Help interprets the formatting you use in Help queries.

Some search tips:

  • Searches are not case-sensitive. For example, "OLE" and "ole" return the same results.
  • You cannot search certain reserved words, such as and, for, from, and with. If these values are included in a search query, they are ignored. For a complete list, see the topic "Full-Text Search Tips".
  • Search queries are evaluated from left to right.
  • The period (.), colon (:), semicolon (;), comma (,), and hyphen (-) are ignored in searches. You cannot search for quotation marks.
  • Wildcard characters, such as * or ?, are no longer supported in Help searches.
  • Use quotation marks to search for an exact phrase. For example, enter "class definition" to search for topics that include the literal phrase "class definition". Without quotation marks, the search is equivalent to specifying "class AND definition", which returns topics that contain both of the individual words.
  • Use logical operators to specify the relationship between words in your search phrase. You can include logical operators, such as AND, OR, NOT, THRU, and NEAR, to further refine your search. For example, if you search for "declaring NEAR union", search results will display topics that contain the words "declaring" and "union" no more than eight words apart from each other.
  • Logical operators must be typed in all capital letters for search to recognize them.
  • You can further restrict the information returned by a search using filters. Help includes three different categories that you can filter by in a full-text search: language, technology, and topic type. Using one or all of these categories further refines your search results.

Found a topic in Help that doesn’t help? Tell the Visual Studio documentation team about it by clicking on the "Send feedback" link in local Help topics, or the "Click to rate and give feedback" link in online Help.