调用WindowsAPI播放声音: procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction); begin sndplaysound('',snd_async); end; procedure TForm1.Button1Click(Sender: TObject); begin sndplaysound('C:\Windows\Media\Windows 错误.wav',snd_async); end; end. 源代码
|
请发表评论