//停止 public void StopT() { try { ilong = APIClass.mciSendString("close media", TemStr, 128, 0); } catch { } }
public void Puase() { try { ilong = APIClass.mciSendString("pause media", TemStr, TemStr.Length, 0); } catch { } }
//播放 public void play() { try { ilong = APIClass.mciSendString("close all", TemStr, TemStr.Length, 0); Name = "open " + Convert.ToChar(34) + FileName + Convert.ToChar(34) + " alias media"; ilong = APIClass.mciSendString(Name, TemStr, TemStr.Length, 0); APIClass.mciSendString("play media" + (repeat ? " repeat" : ""), TemStr, TemStr.Length, 0); } catch { } }