stify : DrawText(Canvas.Handle,PChar(GetLabelText),-1,Rect,DT_LEFT + DT_VCENTER + DT_SINGLELINE);
taRightJustify : DrawText(Canvas.Handle,PChar(GetLabelText),-1,Rect,DT_RIGHT + DT_VCENTER + DT_SINGLELINE);
taCenter : DrawText(Canvas.Handle,PChar(GetLabelText),-1,Rect,DT_CENTER + DT_VCENTER + DT_SINGLELINE);
end;
end;
procedure Register;
begin
RegisterComponents(''MyComponents'', [TDBStaticText]);
end;
end.
以上代码在win98/Delphi5环境下调试通过。