Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting colors
Message
De
01/04/1999 11:38:34
 
 
À
01/04/1999 11:31:53
Ian Johnston
Computer Software Solutions
Woodland, Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00204232
Message ID:
00204294
Vues:
17
>>>>>What is the easiest way to present the user with a color selection palette and allow them to select their own colors ?
>>>>
>>>>nColor=getcolor()
>>>>if nColor<0
>>>> return
>>>>endif
>>>>Thisform.Backcolor=nColor
>>>
>>>Is there a way to convert the number returned by this for use in the RGB function? I have existing classes that I used rgb() to set the colors.
>>
>>nRed=nColor%256
>>nGreen=int((nColor%65536)/256)
>>nBlue=int(nColor/65536)
>Is there a way to convert the rgb value back so that it can be passed as a paramter in getcolor() to allow the user to see the currently selected color ?

Seemingly,
nColor=65536*nBlue+256*nGreen+nRed
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform