
Write color index to Visio shapesheet via VB?
I'm having a hard time coordinating colors between a VB-authored
control, and the Visio shapesheet of the shape that contains it. I can
certainly get colors from the shapesheet, call the required Red(),
Green(), and Blue() functions, and create an OLE_COLOR variable from
them.
The tough(er) part is to let the user choose colors from the control's
property page (standard ForeColor and BackColor pages), and push the
respective value to the Visio shapesheet. To properly coordinate this, I
suspect I need to set the control's palette to the same as the Visio
document. I _believe_ I have done this by setting UserControl.Palette =
Ambient.Palette. I have also set the UserControl.PaletteMode property =
vbPaletteModeContainer.
What I seem to be missing (mostly, I think) is how to derive the chosen
Index number from the palette displayed (which assumes that I correctly
got the Palette from Visio in the first place.
Any/All help appreciated!
Mike Schoonmaker