hey...es geht
Also der thread anscheinend.
Nun hab ich das mal kopiert und mein Zeugs eingefügt: (Kleiner ausschnitt)
Delphi-Quellcode:
procedure TGetRemoteVersionThread.UpdateCaption;
var new:
string;
begin
with Form1
do
begin
///
//chat.Lines.Clear;
new := idhttp1.Get(
URL+'
/admin.php?nick='+nick+'
&pw='+pw+'
&go=getchat'+'
&casenick='+casenick+'
&lastid='+lastid);
new := StringReplace(new, '
###', #13#10, [rfReplaceAll]);
if (new = '
')
OR (new = '
')
then begin
end else begin
chat.Lines.Add(new);
end;
lastid := idhttp1.Get(
URL+'
/admin.php?nick='+nick+'
&pw='+pw+'
&go=getlastid'+'
&casenick='+casenick);
///
end;
end;
// =============================================================================
procedure TGetRemoteVersionThread.Execute;
begin
Synchronize(UpdateCaption);
end;
////////////////////////////////////////////////////////////////////
procedure TForm1.Timer2Timer(Sender: TObject);
var
Thread: TGetRemoteVersionThread;
begin
Thread := TGetRemoteVersionThread.Create(True);
Thread.FreeOnTerminate := True;
Thread.Resume;
end;
Er macht zwar das Update...aber es hackt immer noch alle 2 sek.