Windows Media Player形式 [英] Windows Media Player in a Form
本文介绍了Windows Media Player形式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试制作一个包含Windows Media Player的表单.问题是我似乎找不到或编写允许我选择在其上播放的代码.它需要能够允许用户选择要播放的文件,例如openfile对话框.
在此先感谢
Chris
Hi,
I am trying to make a form which contains Windows Media Player in it. The problem is i can''t seem to find or make a code which allows me to choose what to play on it. It needs to be able to allow the user to choose what file to play in it, like a openfiledialog.
Thanks in Advance
Chris
推荐答案
Um.您可以尝试使用OpenFileDialog吗?
Um. You could try an OpenFileDialog?
OpenFileDialog ofd = new OpenFileDialog();
if (ofd.ShowDialog() == DialogResult.OK)
{
axWindowsMediaPlayer1.URL = ofd.FileName;
}
重新发明轮子的任何观点吗?
在CP上搜索媒体播放器",或在此处查看Sacha的超赞舔法:
Sonic:WPF(混合智能客户端)可搜索媒体库 [
Any point in re-inventing the wheel?
Search CP for "media player" or check out Sacha''s awesome lick here:
Sonic : A WPF (hybrid smart client) searchable media library[^]
这篇关于Windows Media Player形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文