H honghu Unregistered / Unconfirmed GUEST, unregistred user! 2004-02-27 #1 如题,怎样才能实现象winamp一样的滚动标题栏???请指教!!!![][][red][/red]
Y yostgxf Unregistered / Unconfirmed GUEST, unregistred user! 2004-02-27 #2 http://www.delphibbs.com/delphibbs/dispq.asp?lid=1210067
A andy263 Unregistered / Unconfirmed GUEST, unregistred user! 2004-02-27 #4 用ttimer控件与加空格处理 特别简单 procedure TForm1.Timer1Timer(Sender: TObject); var CaptionLength:integer; begin CaptionLength:=length(Form1.Caption); if CaptionLength=200 then begin Form1.Caption:='aaaa'; end; Form1.Caption:=' '+Form1.Caption; end; procedure TForm1.Button1Click(Sender: TObject); begin Timer1.Enabled:=true; Form1.Caption:='aaaa'; end; procedure TForm1.Button2Click(Sender: TObject); begin Timer1.Enabled:=false; end;
用ttimer控件与加空格处理 特别简单 procedure TForm1.Timer1Timer(Sender: TObject); var CaptionLength:integer; begin CaptionLength:=length(Form1.Caption); if CaptionLength=200 then begin Form1.Caption:='aaaa'; end; Form1.Caption:=' '+Form1.Caption; end; procedure TForm1.Button1Click(Sender: TObject); begin Timer1.Enabled:=true; Form1.Caption:='aaaa'; end; procedure TForm1.Button2Click(Sender: TObject); begin Timer1.Enabled:=false; end;
W WoDing Unregistered / Unconfirmed GUEST, unregistred user! 2004-02-27 #5 很简单的,用个Ttimer控件就可以了 再里面写form1.Caption:=copy(form1.Caption,3,length(form1.Caption)-2)+copy(form1.Caption,1,2)
很简单的,用个Ttimer控件就可以了 再里面写form1.Caption:=copy(form1.Caption,3,length(form1.Caption)-2)+copy(form1.Caption,1,2)
A apw Unregistered / Unconfirmed GUEST, unregistred user! 2004-02-29 #9 楼上的方法都可以,改变标题栏文字. 若放一组图标在资源中.可以实现动态图标. procedure TForm1.Timer1Timer(Sender: TObject); begin if Timer1.Tag > 7 then Timer.Tag := 1 else Timer.Tag := Timer.Tag = 1; iName := 'AppIcon'+IntToStr(Timer1.Tag) Application.Icon := TIcon(LoadIcon(hInstance, PChar(iName))); end;
楼上的方法都可以,改变标题栏文字. 若放一组图标在资源中.可以实现动态图标. procedure TForm1.Timer1Timer(Sender: TObject); begin if Timer1.Tag > 7 then Timer.Tag := 1 else Timer.Tag := Timer.Tag = 1; iName := 'AppIcon'+IntToStr(Timer1.Tag) Application.Icon := TIcon(LoadIcon(hInstance, PChar(iName))); end;