发信人: kingron(金龍)
整理人: teleme(2001-03-02 08:40:39), 站内信件
|
用下面这个函数就不会了!
procedure BeepEx(feq:word=1200;delay:word=1);
procedure BeepOff;
begin
asm
in al,$61;
and al,$fc;
out $61,al;
end;
end;
const
scale=1193180;
var
temp:word;
begin
temp:=scale div feq;
asm
in al,61h;
or al,3;
out 61h,al;
mov al,$b6;
out 43h,al;
mov ax,temp;
out 42h,al;
mov al,ah;
out 42h,al;
end;
sleep(delay);
beepoff;
end;
【 在 di.pi 的大作中提到:】
: 我的一个小程序中需要让计算机发音来提醒操作员,但是操作员又习惯关掉声卡接他的音箱。所以需要能直接让PC喇叭发音。 但是直接使用 BEEP() 函数结果还是音箱在发音。
: 并且在好心的朋友提示下用windows.beep(0,0)还是音箱在发音。
: 我都快没有办法了。
:
: 能帮助我吗?
:
:......
---- ██████
█┏━━┓█
█┃之金┃█ Delphi版直达快车
█┃印龍┃█
█┗━━┛█
██████ |
|