谢谢各位
帮帮忙

解决方案 »

  1.   

    我加了现在到是能用了但不能播放 这是为什么? 运行没有任何的反映 用mediaplay 可以放
      

  2.   

    就这样调用playsound('e:\1.wav',0,SND_ASYNC)
      

  3.   

    在Uses 里面加上MMSystem单元
      

  4.   

    http://www.latiumsoftware.com/en/delphi/00024.phpuses MMSystem;procedure TForm1.Button1Click(Sender: TObject);
    begin
      sndPlaySound('C:\Windows\Media\Tada.wav',
        SND_NODEFAULT Or SND_ASYNC Or SND_LOOP);
    end;procedure TForm1.Button2Click(Sender: TObject);
    begin
      sndPlaySound(nil, 0); // Stops the sound
    end;
      

  5.   

    HRESULT PlaySound ( 
    BSTR bstrSound, 
    OLE_HANDLE hModule, 
    DWORD dwSound, 
    DWORD dwId );bstrSound 
    BSTR that specifies the sound file to play. 
    hModule 
    Handle of the executable file that contains the resource to load. 
    dwSound 
    Specifies the flag for playing the sound. 
    The following values are defined: SND_APPLICATION SND_NODEFAULT 
    SND_ALIAS SND_NOSTOP 
    SND_ALIAS_ID SND_NOWAIT 
    SND_ASYNC SND_PURGE 
    SND_FILENAME SND_RESOURCE 
    SND_LOOP SND_SYNC 
    SND_MEMORY   For more information about these flags, see the documentation for the Windows CE PlaySound function. dwId 
    Specifies the book identifier. The parameter is ignored if 0. 
    Return Values NOERROR 
    Indicates success. 
    E_INVALIDARG 
    Indicates that the argument is invalid or incompatible. 
    E_OUTOFMEMORY 
    The system ran out of memory during processing.