Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding sysmetric info to build Office 2003 gradients
Message
From
07/06/2005 10:38:13
 
 
To
06/06/2005 11:46:28
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
01020266
Message ID:
01020927
Views:
28
This message has been marked as a message which has helped to the initial question of the thread.
>Hi Frank,
>
>>not sure if this is exactly what you are looking for but check out the FoxPro Advisor answers section from the March 2005 issue. Christof came up with a solution to help me get some gradients done.
>
>Thanks for pointing out Christof's article in FoxPro Advisor. That article is what got me (and my customers) thinking about gradients more.
>
>What I'm trying to figure out is what "sysmetric-like" Windows API calls one would make to create gradients compatible with the current XP theme? Office 2003 does this and is the model with which I want to be visually consistent.
>
>At the very least, I believe there should be somewhere where I can determine start and ending colors for creating XP compatible gradients?
>
>Malcolm

Hi Malcolm,

here's some code that I used to generate my gradients:
lnEndR = 255
lnEndG = 255
lnEndB = 255

lnColor = GetSysColor(COLOR_HIGHLIGHT)
lcRGB = x7colortorgbstring(m.lnColor) && VMP function 

lnStartR = VAL(STREXTRACT(lcRGB,"(", ","))
lnStartG = VAL(STREXTRACT(lcRGB,",", ","))
lnStartB = VAL(STREXTRACT(lcRGB,",", ")",2))

this.imggradient.Picture = CreateGradient8( lnStartR, lnSTartG, lnSTartB, lnEndR, lnEndG, lnEndB)
this.imggradient.RotateFlip = 1

this.imggradient.Move( 0, 0, thisform.Width, 25 )
this.imggradient.Stretch = 2
I used this to create a form similar to the one you see on the left when you open My Computer in XP.

Hope it helps.

Frank
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform