procedure EnableControl(AControl: TWinControl; Enable: Boolean);
begin
with AControl do
if Enable then
SetWindowLong(Handle, GWL_STYLE, (not WS_DISABLED) and
GetWindowLong(Handle, GWL_STYLE))
else
SetWindowLong(Handle, GWL_STYLE, WS_DISABLED + GetWindowLong(Handle,
GWL_STYLE));
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
EnableControl(BitBtn1, False);
BitBtn1.Font.Color := clGreen;
end;