📄 uplay.~pas
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -