It would seem that the API acts strange when certain colors are used. White is obvious, black is a little less problematic. I tried with a yellow, gray, button face, fuchsia, etc., And they look fine.
If someone wants to duplicate the problem without using the Delphi 'Transparent ...' properties, here's a little snippet:
procedure TForm1.Button1Click(Sender: TObject);
var
Color: DWORD;
DC: HDC;
begin
Color := $00FFFFFF;
SetWindowLong(Handle, GWL_EXSTYLE,
GetWindowLong(Handle, GWL_EXSTYLE) or WS_EX_LAYERED );
SetLayeredWindowAttributes(Handle, Color, 255, LWA_COLORKEY);
DC := GetWindowDC(Handle);
SetDCBrushColor(DC, Color);
FillRect(DC, Rect(10, 10, 100, 80), GetStockObject(DC_BRUSH));
ReleaseDC(Handle, DC);
end;
. , - .