I'm guessing i'm doing something wrong, but for whatever reason, i've got two icons i'm trying to display as 16x16 in a panel of the ribbon. Initially, one icon had both 32x32 and 16x16 and the other just had a 32x32. When compiling the addin and running it, both icons are shown as 16x16, but they're 16x16 pie slices of the 32x32 icons. I even went back and added a 16x16 to the other icon resource.
I've only made a couple changes, but nothing seems to have any effect, they show just the top left 16x16 of the 32x32 icon. Is there something else you have to do other than spec FALSE where you add the button to the panel. (Sorry no code snips - i'm at home now without access). Do you have to somehow specify a specific version of the icon in the button definition where you spec the small and large icons?
I feel like i'm missing something.
Thanks
Mike
Solved! Go to Solution.
Solved by djreesing. Go to Solution.
Probably should add this inv 2013 sp2 and i'm using the method as shown here:
http://modthemachine.typepad.com/my_weblog/2012/02/bitmaps-without-vb6-icontoipicture.html
I've come up with a workaround, but it seems to defeat the purpose of .ico files.
I made a copy of my icon that contained 16x16, 24x24, and 32x32 icons and removed all but the 16x16. I then added a new button variable pointing to the 16x16 only and then changed the button definition to point to the 'small only' version i created. This works. The only issue with that is then what is the point of an .ico file containing all sizes if I can't extract the right size at the .addbutton(buttonname, false) line?
I can't seem to come up with a phrasing in the buttondefintion that lets it point to 16x16 for standard and 32x32 for large icons.
Where does that fit into the method from the link above? Is it instead of or in addtion to:
Dim mIPictureDisp2 As IPictureDisp = _ PictureDispConverter.ToIPictureDisp _ (My.Resources.wbTest)
Replace My.Resources.wbTest by New System.Drawing.Icon(My.Resources.wbTest, 16, 16)
Dim mIPictureDisp2 As IPictureDisp = PictureDispConverter.ToIPictureDisp (New System.Drawing.Icon(My.Resources.wbTest, 16, 16))