>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)
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