Problem wyth colors (uint, hexa)

tema enviado por Alayle en C#
tema iniciado el 18/01/2008

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