Autor Beitrag
ralfi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 153



BeitragVerfasst: Mi 24.09.03 12:46 
Hallo!

Wie kann ich einen neuen TThread zur laufzeit erstellen und proceduren zuweisen?
mstuebner
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 132

Win2000, XP
D7
BeitragVerfasst: Mi 24.09.03 13:09 
So wie es in der Dokumentation steht? Eigene Threadklasse ableiten, Execute Methode überschreiben, Instantiieren und dann starten:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
procedure TMainForm.BitBtn2Click(Sender: TObject);
begin
    thread := TMyThread.Create(False);

    if not(thread = nil) then
    begin
        BitBtn2.Enabled := False;
        BitBtn3.Enabled := True;
    end;
end;


Moderiert von user profile iconTino: Delphi-Tags hinzugefügt.

_________________
mfg Matthias