uplay.~pas
来自「商场活动抽奖系统,无需控件,可以正常使用.」· ~PAS 代码 · 共 44 行
~PAS
44 行
unit UPlay;
interface
uses
Classes,SysUtils,math, MMSystem;
type
PlayS = class(TThread)
private
{ Private declarations }
protected
procedure Execute; override;
end;
implementation
uses
UMain;
procedure PlayS.Execute;
var
i:Integer;
tmp,nmb:String;
begin
//循环
//PlaySound(PChar('cb'), hInstance, SND_LOOP or snd_ASync or snd_Resource);
//读数字
nmb:=String(frmMain.edt_nmb.Text);
for i:=1 to length(nmb) do
begin
tmp:=copy(nmb,i,1);
if frmMain.Rdo.ItemIndex=0 then
PlaySound(PChar('g'+tmp), hInstance, snd_ASync or snd_Resource)
else
PlaySound(PChar('b'+tmp), hInstance, snd_ASync or snd_Resource);
sleep(500);
PlaySound(PChar('cb'), hInstance, SND_LOOP or snd_ASync or snd_Resource);
end;
frmMain.btnStart.Enabled:=True;
frmMain.btnClose.Enabled:=True;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?