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 docdetec@microsoft.com.
Dear Doc Detective,
I am creating a notepad-like program in Visual C++. I have the file types set in the file type editor so that when I double-click on a .txt document it will open my program.
It opens to a blank document, but I want it to load the document I double-clicked on. How do I do this?
- Blank in Blacksburg
Dear Blank,
If you have associated both the file type (txt) and an executable file (your program), then double-clicking on a .txt file should open the file in your program. You’ll find the process described in the topic, “How to: Add and Delete Document Types and Associated File Extensions in the File Types Editor”.
If you have done this and you are still seeing a blank document, I suspect that the problem lies in your application code. Check your code to make sure that you aren’t forcing it to load a blank document on application startup. And, this may be obvious, but make sure that the .txt file you are double-clicking actually contains text!
- Doc D
Dear Doc Detective,
I’m using the WebBrowser control in an application to display a Web-based form, and using the WebBrowser.ShowPrintDialog method to allow the user to print the form. The problem is that the Print dialog is not modal, which means that the user can navigate away from the page while the dialog is still displayed.
Is there a way to make WebBrowser.ShowPrintDialog() show the print dialog in modal mode?
- Deadlocked in Dearborn
Dear Deadlocked,
No. There is no way to show the print dialog modally. There is, however, an easy workaround.
Rather than using the ShowPrintDialog method, you can add a PrintDialog control to your form and add code similar to the following:
Dim result As DialogResult = _
PrintDialog1.ShowDialog()
' If the result is OK print the document.
If (result = Windows.Forms.DialogResult.OK)
Then
WebBrowser1.Print()
End If
The difference here is that the ShowPrintDialog uses the Internet Explorer print dialog, while the PrintDialog component is Windows Forms-based. You can learn more about customizing printing in the topic “Windows Forms Print Support”.
- Doc Detective
Dear Doc Detective,
When I get into the various documentation articles on .NET Framework Class Library, there are a lot of icons used in the summary tables in the Namespace pages. There are symbols for classes, interfaces, enumerations, and delegates. Do these symbols have any significance? It seems that each table in the namespace page has the same icon.
- Probing in Provo
Dear Probing,
This is an excellent question, and it took me some searching to find the answer. The somewhat cryptically named topic “Navigation and Graphical Elements in Help Topics” contains a list of the icons. For some unknown reason this topic is buried under the Visual Studio Help Reference section under Application Development in Visual Studio, rather than in the Help on Help section where I would have expected to find it.
These icons provide a way to visually scan a list of members and determine, for example, whether a method is Public or Protected, or whether a Property is available for the .NET Compact Framework. You can also determine the meaning of each icon by hovering over it-a tooltip with a description is displayed.
- The Doc
Dear Doc Detective,
We are considering using ClickOnce deployment for an application that will be rolled out to hundreds of users. My boss is concerned that the default updating mechanism in ClickOnce isn’t flexible enough; he would prefer to have programmatic control over updates. Is there any way to do this?
- Wondering in Winnetka
Dear Wondering,
Wonder no more. ClickOnce does indeed provide a set of APIs that allow you to explicitly control when and how updates are detected and downloaded.
Controlling updates is basically a three step process: add code to your application to check for and download updates, disable automatic updates, and specify a URL for downloading updates. You can learn more in the topic “How to: Add On-Demand Programmatic Update”. And remember, if your boss gives you a raise, you need to share it with the Doc.
- Doctor D
Doc’s Doc Tip of the Day
Ever try to view the MSDN online library over a slow Internet connection? The experience can be frustrating to say the least. If your broadband isn’t very broad, you now have a better option.
The MSDN Library team recently rolled out an enhancement for low-bandwidth users. Near the top of each page you will notice a new “Switch on low bandwidth view” link. Click on the link and you will be taken to a simpler version of the page-all of the info is still there, but the layout is simplified and the slow loading Table of Contents treeview is gone.
The low bandwidth project is currently in Beta, so try it out and let the MSDN team know what you think.
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.
URLs
http://msdn.microsoft.com/en-us/library/4fcx9b75(VS.80).aspx
http://msdn.microsoft.com/en-us/library/xdt36c58.aspx
http://msdn.microsoft.com/en-us/library/5xe58zth.aspx
http://msdn.microsoft.com/en-us/library/cc558901.aspx
http://msdn.microsoft.com/en-us/library/cc558901(loband).aspx