放一个Timer,设定适当的间隔,然后在OnTimer事件里面不断重画并且调整字符串的位置,为了防止闪烁,最好用StaticText

解决方案 »

  1.   

    const ShowLength =  10;  //一行显示的字符数目
    全局变量str_posonTimer:
    begin
      inc(str_pos);
      if str_pos > Length(yourStr)-ShowLength then str_pos:=1;
      Edit1.Text := copy(yourStr,str_pos,ShowLength);
    end;这个函数没有经过测试 
      

  2.   

    借鉴于Borland的VCLScanner,image中事先设定好你的图片.
        DelphiBanner:TImage;
        BCBBanner: TImage;
        BannerTimer: TTimer;
        LinuxBanner: TImage;
    type
      TBannerInFront = (bDelphi, bBCB, bLinux);var
      BannerInFront: TBannerInFront = bDelphi;procedure TfrmMain.BannerTimerTimer(Sender: TObject);
    begin
      case BannerInFront of
        bDelphi:
          begin
            DelphiBanner.Hide;
            BCBBanner.Show;
            BannerInFront := bBCB;
          end;
        bBCB:
          begin
            BCBBanner.Hide;
            LinuxBanner.Show;
            BannerInFront := bLinux;
          end;
        bLinux:
          begin
            LinuxBanner.Hide;
            DelphiBanner.Show;
            BannerInFront := bDelphi;
          end;
      end;
    end;
      

  3.   

    pnlAbout: TPanel;
    procedure TFAbout.Timer1Timer(Sender: TObject);
    begin
        if pnlAbout.Top>-pnlAbout.Height then
          pnlabout.Top:=pnlAbout.Top-1
        else
          pnlAbout.Top:=fAbout.Height-9;
    end;
    这个是上下滚动
      

  4.   


    用timer控制image.canvas.textout()不断重画就可以实现文本的水平滚动动画