如题,请知道的朋友们不啬赐教。
:)
:)
解决方案 »
- 想新建一个Frame到工程中,为何出来一个Form 不解啊 相当郁闷
- Delphi程序读取C#上传到数据库中的图片数据。
- IdHttp控件怎么用,在哪里可以找到
- 有没有组件支持带图像的RTF文件,delphi6的richedit不支持!
- 谁提供个delphi读写xml文档的例子?
- 深圳哪儿有分期付款的笔记本卖啊,知道的进来,散分
- 菜鸟问题7---请介绍一下listview控件的基本属性和使用方法
- 大家知道IE的查看菜单项下面的编码中那些编码是在什么地方吗?(UP有分)
- 为什么访问不了CSDN的专家门诊????
- 为什么我在Form Active事件中加入的Close方法并不能关闭当前窗口?
- 【 哪里有Office XP 下载? 】
- 为什么ActiveForm窗体不能编译?
DWORD dwFreq, // sound frequency, in hertz
DWORD dwDuration // sound duration, in milliseconds
);
Parameters
dwFreq
Windows NT: Specifies the frequency, in hertz, of the sound. This parameter must be in the range 37 through 32,767 (0x25 through 0x7FFF).
dwDuration
Windows NT: Specifies the duration, in milliseconds, of the sound.
Return Values
If the function succeeds, the return value is nonzero.If the function fails, the return value is zero. To get extended error information, call GetLastError.
好像还是不行啊!机箱的小喇叭不发声啊!
(我有声卡,但我是想让机箱的小喇叭发声!)
Label
Skip;
var
VerInfo: TOSVersionInfo;
nStart: DWord;
begin
VerInfo.dwOSVersionInfoSize := SizeOf(VerInfo);
GetVersionEx(VerInfo);
if VerInfo.dwPlatformId = VER_PLATFORM_WIN32_NT then
Windows.Beep(nFreq, nDura)
else
begin
Asm
push bx
in al, $61
mov bl, al
and al, 3
jne Skip
mov al, bl
or al, 3
out $61, al
mov al, $b6
out $43, al
Skip: MOV AX, nFreq
OUT $42, AL
MOV AL, AH
OUT $42, AL
POP BX
end;
nStart := GetTickCount;
repeat
Application.ProcessMessages;
Until GetTickCount > nStart + nDura;
asm
IN AL, $61
AND AL, $FC
OUT $61, AL
end;
end;
end;
若是Win9x或ME:
Procedure Beep(nFreq,nDura: Word);
Label
Skip;
var
VerInfo: TOSVersionInfo;
nStart: DWord;
begin
VerInfo.dwOSVersionInfoSize := SizeOf(VerInfo);
GetVersionEx(VerInfo);
if VerInfo.dwPlatformId = VER_PLATFORM_WIN32_NT then
Windows.Beep(nFreq, nDura)
else
begin
Asm
push bx
in al, $61
mov bl, al
and al, 3
jne Skip
mov al, bl
or al, 3
out $61, al
mov al, $b6
out $43, al
Skip: MOV AX, nFreq
OUT $42, AL
MOV AL, AH
OUT $42, AL
POP BX
end;
nStart := GetTickCount;
repeat
Application.ProcessMessages;
Until GetTickCount > nStart + nDura;
asm
IN AL, $61
AND AL, $FC
OUT $61, AL
end;
end;
end;
Windows.Beep(300,300);
第一个参数是声音的频率,第二个参数是持续时间。
I : Integer;
Begin
For I:=100 To 150 Do Windows.Beep(I*10, 10);
For I:=150 Downto 100 Do Windows.Beep(I*10, 10);
End;