第一个解决问题的得到全部的50分谢谢
再线等待

解决方案 »

  1.   

    你好 to shuixin13(犬犬(心帆)) 
    怎么实现,给断代码吧
      

  2.   

    哈哈。可以用MessageBEEP()函数啊。
    比如:
    当你点按钮时就可以执行下面代码:
    if MessageDlg('quit?',mtConfirmation,[mbYes,mbNo],0)=mrNo then
    MessageBeep(MB_OK)
     else
       begin
    MessageBeep(MB_ICONQUESTION);
    close;
    end
    end;
      

  3.   

    MessageBeep() 
    括号内的既为系统默认的几种声音!  其值可为以下几个
        1 MB_ICONEXECLAMATION
        2 MB_ICONHAND
        3 MB_ICONQUESTION
        4 MB_ICONASTERISK
        5 MB_OK
      

  4.   

    另外如果对这几种声音都不满意可以用另一函数:PlaySound()来调用特定的声音文件。
    格式如下:
      playsound('声音文件路径',0,snd_sync) 
    呵呵。简单吧。
      

  5.   

    呵呵..你播放一个WAV文件不就得了嘛..
      

  6.   

    PlaySound('c:\temp\Cartoon19.wav',0,snd_sync);
    问什么有错误?
    错误信息是
    [Error] Unit1.pas(184): Undeclared identifier: 'PlaySound'
    而且我已经引用了shellapi单元了
      

  7.   

    对了我用的是delphi5.0是不是跟这个由关系呢?
      

  8.   

    呵呵,多来米特别吗?让他唱歌!    windows.beep(523,500);    //1
        windows.beep(587,500);     //2
         windows.beep(659,500);     //3
        windows.beep(698,500);      // 4
        windows.beep(784,500);      // 5
        windows.beep(880,500);       // 6
         windows.beep(998,500);       // 7
        windows.beep(1047,500);      //i
      

  9.   

    uses MMSystem ;  PlaySound(PChar('路径\FileName.Wav'),0,SND_SYNC  )  ;
      

  10.   

    PlaySound('c:\temp\Cartoon19.wav',0,snd_sync);
    问什么有错误?
    错误信息是
    [Error] Unit1.pas(184): Undeclared identifier: 'PlaySound'
    而且我已经引用了shellapi单元了
    ---------------------------------------------------------------------------------呵呵。对的要引用这个函数,可它不能引用为API函数,要在uses内加上 mmsystem。
      

  11.   

    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;
    procedure TForm1.Button1Click(Sender: TObject);
    begin
      BeepEx(100,20);
      BeepEx(1000,200);
      BeepEx(10,100);
    end;