• Domingo 22 de Diciembre de 2024, 10:34

Autor Tema:  Problem Wyth Colors (uint, Hexa)  (Leído 1055 veces)

alayle

  • Nuevo Miembro
  • *
  • Mensajes: 2
    • Ver Perfil
Problem Wyth Colors (uint, Hexa)
« en: Sábado 19 de Enero de 2008, 00:31 »
0
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

JuanK

  • Miembro de ORO
  • ******
  • Mensajes: 5393
  • Nacionalidad: co
    • Ver Perfil
    • http://juank.io
Re: Problem Wyth Colors (uint, Hexa)
« Respuesta #1 en: Sábado 19 de Enero de 2008, 04:33 »
0
in the rarely case you use CSharp...
just use  this:

Código: Text
  1. ocxObject.color = colorDialog1.Color.ToArgb();
  2.  

have fun.


by the way ...
why you write/use an spanish forum to ask your questions in english???
[size=109]Juan Carlos Ruiz Pacheco
[/size]
Microsoft Technical Evangelist
@JuanKRuiz
http://juank.io