unit reThreads3;
interface
uses
Classes, Dialogs, MMSystem, Utilities, SpeechLib_TLB, Windows ;
type
TMyMorseThread = class(TThread)
private
{ Déclarations privées }
protected
procedure Execute; override;
public
Tx:array [0..11] of String[240];
id : Cardinal;
this:integer;
end;
implementation
{ Important : les méthodes et propriétés des objets de la VCL peuvent uniquement
être utilisés dans une méthode appelée en utilisant Synchronize, comme :
Synchronize(UpdateCaption);
où UpdateCaption serait de la forme
procedure TMyThread.UpdateCaption;
begin
Form1.Caption := 'Mis à jour dans un thread';
end; }
{ TMyThread }
procedure TMyMorseThread.Execute;
begin
while Tx[this] <> '' do begin
Morse(Tx[this]);
Tx[this]:='';
this := (this + 1) mod 12;
end;
Suspend;
end;
end.
¤ Dauer der Verarbeitung: 0.16 Sekunden
(vorverarbeitet)
¤
|
Laden
Fehler beim Verzeichnis:
in der Quellcodebibliothek suchen
Die farbliche Syntaxdarstellung ist noch experimentell.
|