C#中使用windows medie player控件
来源:互联网 发布:qq头像上传java源码 编辑:程序博客网 时间:2024/05/21 06:58
windows medie player (以下简称WMP),默认不在vs2005的toolbox中,因此,需要手动添加,下面是在vs2005中使用WMP控件的步骤:
The following is the walkthrough to use a Windows Media Player COM
component in a WinForms application.
1. If the Windows Media Player COM component is not present in the Toolbox,
right-clikc on the Toolbox and choose 'Choose Items'. In the 'Choose
Toolbox Items' dialog, switch to the 'COM Components' tab. Navigate to
'Windows Media Player' (whose path is 'c:/Windows/system32/wmp.dll') and
select the checkbox before this item. Press OK.
2. Drag&drop the Window Media Player COM component from Toolbox onto a
form. At this time, VS IDE will generate wrapper classes for this COM
component automatically. COM components are not managed, so we couldn't use
them directly in .NET applications.
If you expand the Reference node under the project node in the Solution
Explorer, you should see two references called 'AxWMPLib' and 'WMPLib' are
added.
3. You may add the following code to the form:
private void Form1_Load(object sender, EventArgs e)
{
// the 'axWindowsMediaPlayer1' is the name of the Windows Media Player
COM component on the form
MessageBox.Show(this.axWindowsMediaPlayer1.versionInfo);
this.axWindowsMediaPlayer1.URL = "the path of the video/audio file";
}
4. Build the project. Go to the bin/debug folder of the application and you
should see two files called 'AxInterop.WMPLib.dll' and
'Interop.WMPLib.dll', which are the dll files that contain the wrapper
classes for the Windows Media Player COM component.
- C#中使用windows medie player控件
- C#中Windows Media Player控件使用实例|方法
- MFC中对Windows Media Player 控件使用个性皮肤
- 在WinCE中使用Windows Media Player 控件
- C#中使用Windows Media Player播放音乐的方法
- 如何使用 windows media player 控件
- windows media player控件使用心得
- C#使用Windows Media Player播放音频文件
- vs2008 做播放器 中Windows Media Player 控件使用 (全过程演示~)
- Windows Media Player控件
- C# Media Player控件
- C# Media Player控件
- 基于.net的C# Windows Media Player控件
- Windows Media Player控件的使用和使用心得
- VS2003下windows media player 控件的使用问题
- VS2003下windows media player 控件的使用问题
- VC2008 Windows Media Player控件的使用技巧
- VC2008 Windows Media Player控件的使用技巧(二)
- BeanUtils里注册BigDecimalConverter 的方法
- PHP4与PHP5差别之simplexml_load_string
- 关于main参数的问题
- 在Asp.net中使用多线程
- 如何创建一个可以由rundll32.dll调用的动态库
- C#中使用windows medie player控件
- 如何为项目加上代码版本号
- 编程控制windows防火墙的exception list.
- VB中创建可以输出函数的DLL
- 往IE中嵌入工具条
- VB与Windows资源管理器互拷文件
- 如何在IE右键菜单中添加菜单项以及如何添加IE任务栏按钮
- 深入浅出C# 中文版 图文皆译 第四章 类型和引用 page168
- [Web开发] 在网页中动态加入RSS feed 元素