状态条中滚动文字


  with Statusbar1.Canvas do
  begin
    FillRect(DrawRect);
    Font.Color:=clBlack;
    w:=TextWidth('welcom to the Delphi interface...');
    pen.Style:=psClear;
    Rectangle(DrawRect.Left,DrawRect.Top,DrawRect.Right,DrawRect.Bottom);//妙!!!
    TextOut(f,DrawRect.Top,'welcom to the Delphi interface...');
  end;

  if f>w then
    f:=f-30
  else
    f:=DrawRect.right;

原文地址:https://www.cnblogs.com/huking/p/1694239.html