原因很简单,Color在TControl中是私有的。可以这样解决: TMyControl=Class(TControl);/*在每个需用TControl.Color的单元中写*/ procedure ChangeColor(Sender:TObject;iDirection:Integer) begin if iDirection=1 then (Sender as TMyControl).Color:=clAqua else (Sender as TMyControl).Color:=clWindow; end;此文章由 http://www.ositren.com 收集整理 ,地址为: http://www.ositren.com/htmls/67876.html