This is the problem, i have a ocx, that have one control and one uint
Property, like this
Property color, acept values uint, Manually i set the value as this:
object.color = 0xFFFFFF;
for wythe color, i want to set the color using:
ocxObject.color = colorDialog1.Color; /// this is the error
and i get the error, because the ocxObject.color only acept uint
i make the convertion:
ocxObject.color = (uint)(colorDialog1.Color);
and not have error in code but, the colors not Match.
any solutions thanks
Alberto Poblacion - 19 Jan 2008 09:31 GMT
> This is the problem, i have a ocx, that have one control and one uint
> Property, like this
[quoted text clipped - 14 lines]
>
> and not have error in code but, the colors not Match.
Try applying the method ToOle in the class
System.Drawing.ColorTranslator. This converts a System.Drawing.Color to an
OLE Color, which might be what your OCX is expecting.