I have code that looks something like this: UIHierarchyItem item; //... ProjectItem pitem = item.Object as ProjectItem; if ( pitem != null && pitem.FileCount >...
I'm not sure why you're seeing different behavior based on type of item, but I can point out one problem: collections are indexed starting at 1, not 0. This...
... Indeed you are correct(Collections starting at 1? Who has heard of such a thing...?;)). Strange that it did work for most items though. However, changing...
hi, Because I want to use some customized control properties, I make an addin as same as "Visual Studio .Net Properties Window". But I've met such a problem,I...
Is it possible to add a single control from an .NET assembly that contains multiple controls to the toolbox? I can add all the controls no problem by just...
Hi All, I am a newbee to VS.Net Add-In development. I need solutions to some of the problems I have. 1. How to find out the current caret position and pop up a...
I am building an addin that requires the user enters a connection string to a database. Is there anyway I can reuse the connection string builders that the...
... I haven't tried this, but you could try resorting to good old SDK programming. Try calling GetCursorPos to get the current position in screen coordinates,...
I have code in my QueryStatus(for a command thats on the Solution, Project and Item commandbars) that looks somewhat like this: foreach( SelectedItem item in...
... The right click popup of what? If you are talking about the solution explorer, you can add your commands to the Solution, Project, Item and Folder command...
A quick and dirty test showed that I'm not getting the same problem. I'm wondering if 'this.dte.SelectedItems' is getting reevaluated every pass through the...
Is there a well known macro that references the debug working directory in VS2003? Table 2-3 in Craig's book (pgs 49-50) lists a bunch but not the this one. ...
... That is weird. It is very consistent here. ... No, that didn't work either. This works, though: SelectedItems items = this.dte.SelectedItems; for( int i =...
Sorry about the confusion - I was attempting to translate my code from C++ to C#, and ended up masking the problem. The actual code I used to get the selected...
Well, it looks like if the node is the solution node, then both item.Project and item.ProjectItem are null. However, both can be null for various other things...
While you can use the SelectedItems object to find the items selected within the solution explorer, probably the best way to do it is to use the UIHierarchy...
For #2, it is actually much easier than that. If you want to add a command to an existing context menu, then you would use the Office command bar object model...
Currently, there is no way to do this other than to split the controls into seperate DLLs. We are working on a way of doing this better in a future version. ...
Looking through the code model sources, VC has for the custom HRESULT value 8ce00005 E_CM_UNDONE. Which, presumably means E_NOTIMPL. Craig Inside Visual Studio...
The object model for Setup Projects and Help projects is not complete, are not fully supported, and are not documented as usable. You may be able to do some...
I'm so close to getting everything working, and about the only thing left for me to figure out is how to modify the resources. I saw the VCResourceHelper...
Looking at the code, UIHierarchyItem.Object returns the UIHierarchyItem for that node if the node is for the Solution. In fact, for non-Project or ProjectItems...
I have added a new tab with a bunch of controls but the same code that worked in VS2002 isn't working for me in VS2003. It executes fine and actually adds the...
Hmmm, turns out it's adding it to VS2002 (I am automating from an external exe) and running VS2002 and VS2003 side by side. The plot thickens though... upon...