Einzelnen Beitrag anzeigen

mr_emre_d
(Gast)

n/a Beiträge
 
#9

Re: Lauftext in der Titelleiste ?

  Alt 11. Jun 2008, 14:33
ist zwar nicht ganz sauber und bin mir nicht sicher ob es richtig funzt aber so ungefähr sollte es gehen:

Code:
procedure TDeineForm.Animate( Speed: Byte );
var
  buf: char;
  str: String;
  l, i: Integer;
  procedure InitLength;
  begin
    if clientwidth < 500 then
      l:= clientwidth div 5
    else
      l:= clientwidth div 4;
  end;
begin
  str:= Caption;
  while not Application.Terminated do
  begin
    Application.ProcessMessages;
    InitLength;
    if length( str ) < l then
      for i := length( str ) to l do
        str:= str + ' ';
    buf:= str[1];
    delete( str, 1, 1 );
    str:= str + buf;
    caption:= str;
    sleep( speed ); // 50 - 100 = optimal
  end;
end;
  Mit Zitat antworten Zitat