Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vfp color codes to html color codes conversions
Message
De
20/08/2002 12:38:54
 
 
À
20/08/2002 12:35:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00691505
Message ID:
00691531
Vues:
19
Alex,

Incredible..

Than you,

Neil
>>Hi,
>>
>>I have a vfp desk top app that allows users to pick the color of the captions on their command buttons and store thenm in a table. I have a web interface to the table and would like to have the button captions to be displayed in the colors they picked in their desktop interface to the table. But vfp red = 255 and html red is #ff0000. How do you convert vfp color codes to html color codes?
>>
>>Neil
>
>Hi Neil,
>
>Use the following function to convert RGB values to HTML color codes.
>
>
Function RGB2HTMLColor( tnRGB)
>	Local lnRed, lnGreen, lnBlue
>	lnRed = Mod( m.tnRGB, 256)
>	lnGreen = Mod( Int( m.tnRGB/256), 256)
>	lnBlue = Mod( Int( m.tnRGB/65536), 256)
>
>	Return "#" + ;
>		Right( Transform( m.lnRed, "@0"), 2) + ;
>		Right( Transform( m.lnGreen, "@0"), 2) + ;
>		Right( Transform( m.lnBlue, "@0"), 2)
>EndFunc
>
>HTH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform