many thanks for everyone's replies. although, the solution (that it turns out doesn't work as i wanted) was a slight variation:
procedure TForm1.Button1Click(Sender: TObject);
var C:array of TColor;
I:array of LongInt;
begin
setlength(I, 2);
setlength(C, 2);
I[0]:=COLOR_FORM;
C[0]:=clLime;
I[1]:=COLOR_BACKGROUND;
C[1]:=clRed;
SetSysColors(length(I), I, C[0]);
Label1.Caption:='clBackGround' +#13+ 'clForm';
Label2.Caption:='0x'+IntToHex(clBackground, 8) +#13+ '0x'+IntToHex(clForm, 8);
Label3.Caption:='0x'+IntToHex(WidgetSet.GetSysColor(COLOR_BACKGROUND)) +#13+
'0x'+IntToHex(WidgetSet.GetSysColor(COLOR_FORM))
end;
notice we need to pass
C[0] as the last parameter, not just
C.
this produces the results, returned by GetSysColor...
before clicking button1 | clBackGround maps to | 0x00F5F5F5 |
| clForm maps to | 0x00F0F0F0 |
|
after clicking button1 | clBackGround maps to | 0x000000FF |
| clForm map to | 0x0000FF00 |
but unfortunately NONE OF THIS had any effect on the colours of components in the running application!
attached is my test program, it has two buttons - button2 displays an InputQuery window, button1
should reassign the colours. so:
- observe the numbers displayed,
- click button2,
- close the Input query,
- click button1,
- observe the numbers,
- click button 2 and nothing has changed

any ideas?
cheers,
rob :-)