如何在状态栏中实现跑马灯效果,是左可移动的那一种,请各位高手帮忙.多谢谢了

解决方案 »

  1.   

    很难吗?s: string;s := 'How are you';for i:=1 to length(s) do
    begin
      statusbar1.panels[0].text := copy( s, i, length(s)-i+1 ); 
    end;
      

  2.   

    奥,实际应用中要使用Timer才行var
      TextIndex:integer;
      TextContent : string;TextContent := 'How are you!';
     
    OnTimer事件中:
      Inc(TextIndex) ;
      if TextIndex > Length(TextContent) then
         TextIndex := 1;
      statusbar1.panels[0].text := copy( TextContent, TextIndex, length(TextContent)-TextIndex+1 ); 
      
      

  3.   

    s: string;s := 'How are you';for i:=1 to length(s) do
    begin
      statusbar1.panels[0].text := copy( s, i, length(s)-i+1 ); 
    end;
    这个结果只有一个 U 字母
      

  4.   

    flyinwuhan(制怒·三思而后行),这样还不行,效果也是一起出来的,不是一个一个出来的,谢谢你,能不能再帮忙一下?
      

  5.   

    http://soft.56kc.com/Filedown.aspx?FID=64
      

  6.   

    用Timer才行, 间隔设为55/110/220/440
      

  7.   

    flyinwuhan(制怒·三思而后行) ,用Timer才行, 间隔设为55/110/220/440,这如何办?能否加入为QQ好友? 我的QQ为:99331590
      

  8.   

    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, ExtCtrls;type
      TForm1 = class(TForm)
        Timer1: TTimer;
        procedure Timer1Timer(Sender: TObject);
        procedure FormCreate(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;
      TextIndex: integer;
      TextContent: string;implementation{$R *.dfm}procedure TForm1.Timer1Timer(Sender: TObject);
    begin
      Inc(TextIndex) ;
      if TextIndex > Length(TextContent) then
         TextIndex := 1;
      Caption := copy( TextContent, TextIndex, length(TextContent)-TextIndex+1 );end;procedure TForm1.FormCreate(Sender: TObject);
    begin
      TextContent := 'How are you!';
    end;end.DFM :object Form1: TForm1
      Left = 192
      Top = 107
      Width = 544
      Height = 375
      Caption = 'Form1'
      Color = clBtnFace
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      OldCreateOrder = False
      OnCreate = FormCreate
      PixelsPerInch = 96
      TextHeight = 13
      object Timer1: TTimer
        Interval = 220
        OnTimer = Timer1Timer
        Left = 256
        Top = 176
      end
    end
      

  9.   

    谢谢flyinwuhan(制怒·三思而后行