?? tchou.pas
字號(hào):
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
//取隨機(jī)數(shù)
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.
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -