📄 tchou.pas
字号:
unit TChou;
interface
uses
Classes,SysUtils,math;
type
DispCJ = class(TThread)
private
{ Private declarations }
public
k:integer;
protected
procedure Execute; override;
end;
implementation
uses main;
{ Important: Methods and properties of objects in visual components can only be
used in a method called using Synchronize, for example,
Synchronize(UpdateCaption);
and UpdateCaption could look like,
procedure DispCJ.UpdateCaption;
begin
Form1.Caption := 'Updated in a thread';
end; }
{ DispCJ }
procedure DispCJ.Execute;
var
i,q:integer;
begin
{ Place thread code here }
while form1.bz do
begin
//取随机数
q:=form1.Memo1.Lines.Count ;
Randomize;
i:=RandomRange(0,q);
k:=i;
form1.Edit2.Text := form1.Memo1.Lines.Strings[i];
form1.Memo2.Lines.Append(form1.Memo1.Lines.Strings[i]);
form1.Memo2.Update;
sleep(10);
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -