代码如下:
也不用添加控件,请大家建一个windows 应用程序,添加以下该添加的代码,运行看看 public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
void playmusic()
{
string mymusic = "D:\\万里长城永不倒.mp3";
QuartzTypeLib.FilgraphManager graphManager = new QuartzTypeLib.FilgraphManager();
QuartzTypeLib.IMediaControl mycontrol = (QuartzTypeLib.IMediaControl)graphManager;
mycontrol.RenderFile(mymusic);
mycontrol.Run();
}
private void Form1_Load(object sender, EventArgs e)
{
playmusic();
}
也不用添加控件,请大家建一个windows 应用程序,添加以下该添加的代码,运行看看 public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
void playmusic()
{
string mymusic = "D:\\万里长城永不倒.mp3";
QuartzTypeLib.FilgraphManager graphManager = new QuartzTypeLib.FilgraphManager();
QuartzTypeLib.IMediaControl mycontrol = (QuartzTypeLib.IMediaControl)graphManager;
mycontrol.RenderFile(mymusic);
mycontrol.Run();
}
private void Form1_Load(object sender, EventArgs e)
{
playmusic();
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货