Unit2.pas 562 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. unit Unit2;
  2. interface
  3. uses
  4. Classes;
  5. type
  6. kjh = class(TThread)
  7. private
  8. { Private declarations }
  9. protected
  10. procedure Execute; override;
  11. end;
  12. implementation
  13. { Important: Methods and properties of objects in VCL or CLX can only be used
  14. in a method called using Synchronize, for example,
  15. Synchronize(UpdateCaption);
  16. and UpdateCaption could look like,
  17. procedure kjh.UpdateCaption;
  18. begin
  19. Form1.Caption := 'Updated in a thread';
  20. end; }
  21. { kjh }
  22. procedure kjh.Execute;
  23. begin
  24. { Place thread code here }
  25. end;
  26. end.