滚动的标题栏文字实现:
procedure TForm1.FormCreate(Sender: TObject);
var
oldtitle:String;
begin
self.Caption:='滚动的标题文字';
application.Title:=self.Caption;
oldtitle:=self.Caption;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
var temp:string;
begin
temp:=application.Title;
temp:=temp+temp[1]+temp[2];
temp:=copy(temp,3,length(temp));
application.Title:= temp;
form1.Caption:=temp;
end;
procedure TForm1.Button1Click(Sender: TObject);
var oldtitle:string;
begin
timer1.Enabled:=not timer1.Enabled;
if timer1.Enabled=false then
begin
oldtitle:=application.Title;
form1.Caption:=oldtitle;
end;
end;
本文到目前为止有0条评论