⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tchou.pas

📁 delphi2007 开发的一个抽奖系统(带源代码)
💻 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 + -