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 need to know how to read and write file property summary information - the values that you see in the Summary tab of a file's Properties dialog, such as Title, Subject and Author. I can open this dialog and type the information into the fields, but how would I read and write this information programmatically?

- Perplexed in Petaluma

Dear Perplexed,

Good question - I've always wondered how to do that myself. I couldn't find anything in the documentation, but I did find an article in the Knowledge Base: "Dsofile.dll lets you edit Office document properties without Office in Visual Basic .NET 2003 and in Visual Basic .NET 2002".

The article has a link to a free download that includes a COM .dll for reading document properties as well as a Visual Basic sample application. It's intended to work primarily with Office files, but it looks like it can read and write the summary info for any type of file. And yes, it works in Visual Studio 2005 as well.

- Doc D

Dear Doc Detective,

I’m using a DataGridViewButtonCell in a DataGridView. I want to get a handle on the actual button that is in the cell so that I can change the color and hook up a delegate for when the button is pressed. I can find no way to do this in the documentation and using the debugger and inspector hasn’t helped much either. I can’t find the button. I assume it is a Button object, but maybe it isn’t. I am quite surprised that the documentation isn’t more clear about this. Why would you put a button in a table if you didn’t want to have access to it?

--Buttonless in Buffalo

Dear Buttonless,

If it looks like a button and acts like a button... well, in this case, it isn't a button. According to the rather sparse documentation for the DataGridViewButtonCell class, it displays a "button-like" UI. I take that to mean that it isn't a button object but rather that the cell is being painted to look like a button.

You can, however, add pretty much any type of control to a cell on your own. The topic "How to: Host Controls in Windows Forms DataGridView Cells" explains how to add column that displays DateTimePicker controls. You should be able to modify this code to use a Button control instead and then customize it to do what you want.

- Doctor D

Dear Doc Detective,

I'm using the ASP .NET TreeView control to display data on a Web page. I have to populate the TreeView from a database - its capacity is approximately 7500 nodes. I populate the treeview on demand - that is, it loads the nodes as they are expanded, just like the MSDN Online Library's treeview.

The main problem is that when the tree is expanded to a certain size it freezes, it just can't handle the number of nodes without posting back. I've noticed that the MSDN TreeView doesn't seem to have a problem handling large numbers of nodes added on demand. How do they do it?

- Treed in Trenton

Dear Treed,

It's a secret! Actually, I don't know how they do it, but I do know how to make the TreeView populate itself without freezing and without posting back. The PopulateNodesFromClient property allows you to dynamically populate the nodes on the client side. When the PopulateNodesFromClient property is set to true, a service is called from the client to populate the tree nodes, which eliminates the need to post back to the server.

The topic "TreeView.PopulateNodesFromClient Property" discusses this and has a good code example. Read the topic carefully though - there are other properties that need to be set in order to make the PopulateNodesFromClient property work.

- the Doc

Dear Doc Detective,

I'm working in Visual Studio 2005 on a desktop application. In this application I display a dialog box, and I want the title bar to display the same icon that I use for the application. I have set the ShowIcon property of the dialog box to True, but I still can't see the icon. Can you help me to solve this problem?

-- Hidden in Hyderabad

Dear Hidden,

Icon probably help you. I'm guessing that you have also set the ControlBox property to False. If you read the fine print in the ShowIcon topic, you'll see that disabling the ControlBox also disables the icon, and when the dialog is minimized a generic icon is shown in the taskbar.

-- Doc Detective

Doc’s Doc Tip of the Day

If you've visited the online MSDN Library lately, you may have noticed a new green Community Content section at the bottom of each page. This is the final incarnation of the MSDN Wiki that the Doc mentioned several issues back, now live in the main library.

The Community Content section allows you to add content to any topic, and also to edit or correct content entered by others. If you see a "Community Content" link at the top of a topic, there is already additional content for that topic; it you see a "Add Content" link then the section is empty.

The Doc urges you to "pay it forward" by adding to the Community Content whenever possible - if everyone contributes, you might just put him out of a job. You can learn more about how to contribute by visiting the Connect site.

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

URLs

http://support.microsoft.com/?id=224351

http://msdn2.microsoft.com/en-us/library/system.windows.forms.datagridviewbuttoncell.aspx

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

http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.treeview.populatenodesfromclient(VS.80).aspx

http://msdn2.microsoft.com/en-us/library/system.windows.forms.form.showicon(VS.80).aspx

http://connect.microsoft.com/site/sitehome.aspx?siteid=112