我环顾四周,我发现的一切都在谈论嵌入它。
我不想嵌入它。我想单击一个按钮并单独启动 Windows 媒体播放器。
例如,我有一个保存在 XML 文件中的位置。我有一个右键单击单击播放。它拉动了位置。像这样。
int dd = dataGridView1.CurrentRow.Index;
string eLoc = dataGridView1.Rows[dd].Cells[4].Value.ToString();
if (eLoc == "")
{
MessageBox.Show("You have not saved a location for this movie","Movie Play",MessageBoxButtons.OK,MessageBoxIcon.Information);
}
else
{
MessageBox.Show(eLoc);
ProcessStartInfo ps = new ProcessStartInfo("wmplayer.exe", eLoc.ToString());
Process.Start(ps);
}
如您所见,我有一个弹出窗口可以查看字符串是什么。
它是这个。我添加了 %20 来替换空格,认为这是问题所在,但事实并非如此。
如您所见,它拉动了完整的位置。我从 Windows 媒体播放器得到的只是这个。
有任何想法吗?对我来说,这似乎应该工作..