MZ-Tools Articles Series: HOWTO: Get the bitmap of a component type from Visual Studio add-in
Continuing with the problems introduced by the new gray icons of Visual Studio 2012, my new article explains the approach that Microsoft used to solve this problem that I reported:
Document Outline toolwindow of VS 2010 shows icons of VS 11 Beta (gray)
My MZ-Tools add-in provides a Control Explorer feature that is like the Document Outline feature of Visual Studio but enhanced (multi-selection, property grid with most used properties, etc.). After weeks theming MZ-Tools icons, toolwindows and modal forms, the last piece was how to get the gray icons of controls and components in the treeview of that feature like the Document Outline does, rather than the colored ones. It took me several hours of investigation but I figured it out:
HOWTO: Get the bitmap of a component type from Visual Studio add-in
Incredible as it is, while the Document Outline of Visual Studio 2012 uses that approach, the Toolbox doesn't. The gray icons of the System.Windows.Forms controls used in the VS 2012 toolbox seems to be stored in a unmanaged resource dll (Microsoft.VisualStudio.Windows.FormsUI.dll in the folder C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\1033). I don't know why yet but I will investigate it some other day (all this is quite exhausting).