#Windows Calla
14-Oct-91 13:29:32
Sb: #2991-#Windows Calla
Fm: Costas Kitsos 73667,1755
To: Chester L. Kloss 72311,743
Chet,
I admit I haven't played much with SetSysColors. I took a look at the
reference and discovered that lpSysColor and lpColorValues can accept
arrays of integers and longs. So, the correct declaration would be:
Declare Sub SetSysColors Lib "User" (ByVal nChanges As Integer,
lpSysColor As Integer,
lpColorValues As Long)
nChanges is the number of colors to be changed, e.g. 2.
lpSysColor is an array of integers of the elements to be changed, e.g.
ReDim MyColor%(2)
MyColor%(1) = COLOR_WINDOWTEXT
MyColor%(2) = COLOR_CAPTIONTEXT
lpColorValues is an array of long integers with the new RGB values, e.g.
ReDim MyRGB&(2)
MyRGB&(1) = &H0000FFFF&
MyRGB&(2) = &H00C0C000&
With the above example, you'd call SetSysColors like:
SetSysColors 2, MyColor%(1), MyRGB&(1)
When passing arrays of integer type you only need to specify the first
member of the array.
Costas
There is 1 Reply.