可以用api
PlaySound。
[DllImport("Winmm.dll")]
public static extern long PlaySound(string name,long  module,long flag);
楼主可以查下。

解决方案 »

  1.   

    你也可以使用c#中的axmediaplayer控件,修改一下size就可以啦API 可能会死机哦
      

  2.   

    axmediaplayer控件在哪啊?我怎么找不到啊?
      

  3.   

    就是 windows media player 组件啊,自定义工具箱---------windows media player
    你就找到了
      

  4.   

    windows media player 控件在播放一个声音未完毕时如何从头播放此声音?
      

  5.   

    应该有相应的方法
    你去WMP sdk查查看吧
    有个很好的示例sample
      

  6.   

    //--------------下面是调用代码--------------------
    ShareClass.WAVSounds ws = new ShareClass.WAVSounds();
    string m_PathStr = Application.StartupPath+@"\newMessage.wav";//声音文件的路劲,不能有中文.
    ws.Play(m_PathStr,ws.SND_ASYNC);

    //-------------CLASS-----------------
    using System;
    using System.Runtime.InteropServices;namespace ShareClass
    {
    /// <summary>
    /// 播放指定的声音文件
    /// </summary>
    public class WAVSounds
    { [DllImport("WinMM.dll")]
    public static extern bool  PlaySound(byte[]wfname, int fuSound); //  flag values for SoundFlags  argument on PlaySound
    public int SND_SYNC            = 0x0000;  // play synchronously (default) 
    public int SND_ASYNC           = 0x0001;  // play asynchronously 
    public int SND_NODEFAULT       = 0x0002;  // silence (!default) if sound not found 
    public int SND_MEMORY          = 0x0004;  // pszSound points to a memory file 
    public int SND_LOOP            = 0x0008;  // loop the sound until next sndPlaySound 
    public int SND_NOSTOP          = 0x0010;  // don't stop any currently playing sound  public int SND_NOWAIT      = 0x00002000; // don't wait if the driver is busy 
    public int SND_ALIAS       = 0x00010000; // name is a registry alias 
    public int SND_ALIAS_ID    = 0x00110000; // alias is a predefined ID 
    public int SND_FILENAME    = 0x00020000; // name is file name 
    public int SND_RESOURCE    = 0x00040004; // name is resource name or atom 
    public int SND_PURGE           = 0x0040;  // purge non-static events for task 
    public int SND_APPLICATION     = 0x0080;  // look for application specific association  //--------------------------------------------------------------------
    public WAVSounds()
    {
    }
    //-------------------------------------------------------------------
    ~WAVSounds()
    {
    }
    //-------------------------------------------------------------------
    public void Play(string wfname,int SoundFlags)
    {
    byte[] bname = new Byte[256]; //Max path length
    bname = System.Text.Encoding.ASCII.GetBytes(wfname);
    PlaySound(bname,SoundFlags);
    }
    //--------------------------------------------------------------------
    public void StopPlay()
    {
    PlaySound(null,SND_PURGE);
    }
    //----------------------------------------------------------------------
    //End WAVSounds class
    }
    }
      

  7.   

    CSDNATM(青蛙【如果你是公主,可以吻我一下吗】)的方法 就可以了;