AxWindowsMediaPlayer的详细用法
AxWindowsMediaPlayer 主要属性与方法

axWindowsMediaPlayer1.Ctlcontrols.Volume 音量
axWindowsMediaPlayer1.Ctlcontrols.Mute 静音
EndPoint = AxWindowsMediaPlayer1.currentMedia.duration
currentMedia.setItemInfo(const string); 通过属性名设置媒体信息
:string; 同 currentMedia.getItemInfo("Title")
[currentPlaylist] wmp.currentPlaylist //当前播放列表属性
axWindowsMediaPlayer1.Ctlcontrols.EnableContextMenu 是否允许在控件上点击鼠标右键时弹出快捷菜单
axWindowsMediaPlayer1.Ctlcontrols.AnimationAtStart 是否在播放前先播放动画
axWindowsMediaPlayer1.Ctlcontrols.ShowControls 是否显示控件工具栏
Exit Sub
End Try
注意:
AxWindowsMediaPlayer1.URL 中URL是表示要播放的文件名,取消了原来的Name属性.
AxWindowsMediaPlayer1.Ctlcontrols.play()播放,同样还有Pause,Stop等其他属性.
axWindowsMediaPlayer1.Width = intWidth + 2;
电脑如何设置WindowsMediaPlayer播放器

电脑如何设置Windows Media Player播放器
现在的电脑,只要下载过视频软件,就不会再用微软的Windows Media Player,但是,Windows Media Player自己会和系统一样进行更新,互动,还是占用了很多的CPU。
下面店铺就为大家介绍一下Windows Media Player策略设置的方法吧,欢迎大家参考和学习。
具体的设置方法和步骤:
第一步、我们在“开始”菜单的“附件”中点击“运行”,或者在键盘上同时按下“Win”键和“R”键,跳出“运行”窗口。
第二步、在运行窗口中,输入“gpedit.msc”点击“确定”,打开“本地组策略编辑器”窗口。
第三步、在“本地组策略编辑器”窗口,我们依次找到“计算机配置”-“管理模版”-“Windows组件”-“WindowsMedia Player”。
并点击该文件夹,查看右栏选项。
首先,我们在右栏找到“防止自动更新”点击“策略设置”。
其次,选择“已启用”单击“确定”按键。
首先,我们双击右栏的“不显示首次使用对话框”。
其次,选择“已启用”单击“确定”按键。
首先,我们双击右栏的“防止媒体共享”。
其次,选择“已启用”单击“确定”按钮即可。
后记:
通过Windows Media Player策略设置,我们可以把这个系统软件所占的空间降低到最少。
大家也可以根据相同办法进行设置其他系统软件。
电脑XP系统如何使用Media Player浏览图片的方法

电脑XP系统如何使用Media Player浏览图片的方
法
电脑Windows Mdia Player是一款非常受欢迎的多媒体软件,我们可以使用它来播放各类视频。
同时也可以用来浏览图片下面是小编为大家整理的关于电脑XP系统如何使用Media Player浏览图片,一起来看看吧!
电脑XP系统如何使用Media Player浏览图片的方法
1、打开WinXP系统自带的Windows Media Player。
2、执行“文件”菜单--“打开”命令,然后在弹出的对话框中选择需要浏览的图片文件,再点击打开按钮即可,(注意需要将“文件类型”改为“所有类型”,否则看不到图片文件)如下图:
如果需要选取多个不连续的图片可以按Ctrl键,如果需要选取多个连续的图片可以按Shift键。
3、然后,Media Player 就像播幻灯片一样按顺序自动播放这些图片,而且效果也很不错,如下图:
以上就是小编为大家带来的XP系统使用Media Player浏览图片的方法了。
AxWindowsMediaPlayer的详细用法

AxWindowsMediaPlayer的详细用法发布时间:2009-9-30 10:49:23 被阅览数:598次文字大小:〖大中小〗属性/方法名:说明:[基本属性]URL:String; 指定媒体位置,本机或网络地址uiMode:String; 播放器界面模式,可为Full, Mini, None, InvisibleplayState:integer; 播放状态,1=停止,2=暂停,3=播放,6=正在缓冲,9=正在连接,10=准备就绪switch (e.newState){case 0: // UndefinedcurrentStateLabel.Text = "Undefined";break;case 1: // StoppedcurrentStateLabel.Text = "Stopped";break;case 2: // PausedcurrentStateLabel.Text = "Paused";break;case 3: // PlayingcurrentStateLabel.Text = "Playing";break;case 4: // ScanForwardcurrentStateLabel.Text = "ScanForward";break;case 5: // ScanReversecurrentStateLabel.Text = "ScanReverse";break;case 6: // BufferingcurrentStateLabel.Text = "Buffering";break;case 7: // WaitingcurrentStateLabel.Text = "Waiting";break;case 8: // MediaEndedcurrentStateLabel.Text = "MediaEnded";break;case 9: // TransitioningcurrentStateLabel.Text = "Transitioning";break;case 10: // ReadycurrentStateLabel.Text = "Ready";break;case 11: // ReconnectingcurrentStateLabel.Text = "Reconnecting";break;case 12: // LastcurrentStateLabel.Text = "Last";break;default:currentStateLabel.Text = ("Unknown State: " + e.newState.ToString());break;enableContextMenu:Boolean; 启用/禁用右键菜单fullScreen:boolean; 是否全屏显示[controls] wmp.controls //播放器基本控制controls.play; 播放controls.pause; 暂停controls.stop; 停止controls.currentPosition:double; 当前进度controls.currentPositionString:string; 当前进度,字符串格式。
WindowsMediaPlayer控件的所有属性和方法

WindowsMediaPlayer控件的所有属性和方法Windows Media Player控件的所有属性和方法----1记录格式说明:“@@ 语言= xxxx”:记录当前翻译用语言的种类,必须在首部,请不要更改。
“@@ 类型库= xxxx”:如果为包装类型库,则记录类型库的相关信息,请不要更改。
“@@ 组件= xxxx”:如果为包装组件,则记录组件的相关信息,请不要更改,与类型库信息不能同时存在。
“##1”:表示某翻译项的开始,格式为“##1 项目原名= 翻译后的名称”,下行首直到下一翻译项标记处记录有关此项目的详细解释信息。
“##0”:记录被屏蔽的项目,被屏蔽项目将不会被包装支持库输出。
格式为“##0 项目原名”,不能屏蔽参数。
------------------------------------------------------------@@ 语言 = 1@@ 组件= {6BF52A52-394A-11d3-B153-00C04F79FAA6},Windows媒体播放器Windows Media Player控件,需要Windows Media Player 9或以上版本##0 IWMPEvents = Notuseful##1 IWMPEvents.OpenStateChange =Sent when the control changes OpenState##1 IWMPEvents.PlayStateChange =Sent when the control changes PlayState##1 IWMPEvents.AudioLanguageChange =Sent when the current audio language has changed##1 IWMPEvents.StatusChange =Sent when the status string changes##1 IWMPEvents.ScriptCommand =Sent when a synchronized command or URL is received##1 IWMPEvents.NewStream =Sent when a new stream is started in a channel##1 IWMPEvents.Disconnect =Sent when the control is disconnected from the server##1 IWMPEvents.Buffering =Sent when the control begins or ends buffering##1 IWMPEvents.Error =Sent when the control has an error condition##1 IWMPEvents.Warning =Sent when the control encounters a problem##1 IWMPEvents.EndOfStream =Sent when the end of file is reached##1 IWMPEvents.PositionChange =Indicates that the current position of the movie has changed ##1 IWMPEvents.MarkerHit =Sent when a marker is reached##1 IWMPEvents.DurationUnitChange =Indicates that the unit used to express duration and position has changed##1 IWMPEvents.CdromMediaChange =Indicates that the CD ROM media has changed##1 IWMPEvents.PlaylistChange =Sent when a playlist changes##1 IWMPEvents.CurrentPlaylistChange =Sent when the current playlist changes##1 IWMPEvents.CurrentPlaylistItemAvailable =Sent when a current playlist item becomes available##1 IWMPEvents.MediaChange =Sent when a media object changes##1 IWMPEvents.CurrentMediaItemAvailable =Sent when a current media item becomes available##1 IWMPEvents.CurrentItemChange =Sent when the item selection on the current playlist changes ##1 IWMPEvents.MediaCollectionChange =Sent when the media collection needs to be requeried##1 IWMPEvents.MediaCollectionAttributeStringAdded =Sent when an attribute string is added in the media collection##1 IWMPEvents.MediaCollectionAttributeStringRemoved =Sent when an attribute string is removed from the media collection##1 IWMPEvents.MediaCollectionAttributeStringChanged = Sent when an attribute string is changed in the media collection##1 IWMPEvents.PlaylistCollectionChange =Sent when playlist collection needs to be requeried##1 IWMPEvents.PlaylistCollectionPlaylistAdded =Sent when a playlist is added to the playlist collection##1 IWMPEvents.PlaylistCollectionPlaylistRemoved =Sent when a playlist is removed from the playlist collection ##1 IWMPEvents.PlaylistCollectionPlaylistSetAsDeleted =Sent when a playlist has been set or reset as deleted##1 IWMPEvents.ModeChange =Playlist playback mode has changed##1 IWMPEvents.MediaError =Sent when the media object has an error condition##1 IWMPEvents.OpenPlaylistSwitch =Current playlist switch with no open state change##1 IWMPEvents.DomainChange =Send a current domain##1 IWMPEvents.SwitchedT oPlayerApplication = Sent when display switches to player application##1 IWMPEvents.SwitchedT oControl =Sent when display switches to control##1 IWMPEvents.PlayerDockedStateChange =Sent when the player docks or undocks##1 IWMPEvents.PlayerReconnect =Sent when the OCX reconnects to the player##1 IWMPEvents.Click =Occurs when a user clicks the mouse##1 IWMPEvents.DoubleClick =Occurs when a user double-clicks the mouse##1 IWMPEvents.KeyDown =Occurs when a key is pressed##1 IWMPEvents.KeyPress =Occurs when a key is pressed and released##1 IWMPEvents.KeyUp =Occurs when a key is released##1 IWMPEvents.MouseDown =Occurs when a mouse button is pressed##1 IWMPEvents.MouseMove =Occurs when a mouse pointer is moved##1 IWMPEvents.MouseUp =Occurs when a mouse button is released##0 WMPPlaylistChangeEventType = Notuseful##1 WMPPlaylistChangeEventType.wmplcUnknown =Unknown##1 WMPPlaylistChangeEventType.wmplcClear =Clear##1 WMPPlaylistChangeEventType.wmplcInfoChange =InfoChange##1 WMPPlaylistChangeEventType.wmplcMove =Move##1 WMPPlaylistChangeEventType.wmplcDelete =Delete##1 WMPPlaylistChangeEventType.wmplcInsert =Insert##1 WMPPlaylistChangeEventType.wmplcAppend =Append##1 WMPPlaylistChangeEventType.wmplcPrivate =Private##1 WMPPlaylistChangeEventType.wmplcNameChange = NameChange##1 WMPPlaylistChangeEventType.wmplcMorph =Morph##1 WMPPlaylistChangeEventType.wmplcSort =Sort##1 WMPPlaylistChangeEventType.wmplcLast =Last##1 WindowsMediaPlayer = WMP播放器Windows媒体播放器控件##1 WindowsMediaPlayer.close = 关闭关闭媒体播放器##1 WindowsMediaPlayer.URL = 地址返回或设置要播放的媒体文件的文件名或者URL,例如"c:\1.mp3","[url=/doc/12b369659b6648d7c1c74661.html /video.asf][color=#0000ff]/doc/12b369659b66 48d7c1c74661.html /video.asf[/color][/url]"##1 WindowsMediaPlayer.openState = 打开状态返回播放器的打开状态##1 WindowsMediaPlayer.playState = 播放状态返回播放器的播放状态,使用"播放状态"枚举常量##1 WindowsMediaPlayer.Getcontrols = 取控制获取控制对象##1 WindowsMediaPlayer.Getsettings = 取设定获取设定对象##1 WindowsMediaPlayer.GetcurrentMedia = 取当前媒体获取当前媒体对象##0 WindowsMediaPlayer.GetmediaCollection = Notuseful 获取媒体集合对象##0 WindowsMediaPlayer.GetplaylistCollection = Notuseful 获取播放列表集合对象##1 WindowsMediaPlayer.versionInfo = 版本信息返回Windows Media Player的版本信息##0/doc/12b369659b6648d7c1c74661.html unchURL = Notuseful##1 WindowsMediaPlayer.Getnetwork = 取网络获取网络对象##1 WindowsMediaPlayer.GetcurrentPlaylist = 取当前播放列表获取当前播放列表对象##1 WindowsMediaPlayer.GetcdromCollection = 取光驱集获取光驱集合对象##0 WindowsMediaPlayer.GetclosedCaption = Notuseful Returns the closed caption handler##1 WindowsMediaPlayer.isOnline = 在线返回当前计算机是否连接到了Internet上##0 WindowsMediaPlayer.GetError = Notuseful获取错误对象##1 WindowsMediaPlayer.status = 状态以文本型方式返回当前播放器的状态##0 WindowsMediaPlayer.Getdvd = Notuseful获取DVD对象##0 WindowsMediaPlayer.newPlaylist = Notuseful创建一个新的播放列表##1 WindowsMediaPlayer.newPlaylist.bstrName = 播放列表名新的播放列表的名称##1 WindowsMediaPlayer.newMedia = 创建媒体对象创建一个新的媒体对象##1 WindowsMediaPlayer.newMedia.bstrURL = 媒体文件媒体文件名,例如:"c:\1.mp3","[url=/doc/12b369659b6648d7c1c74661.html /capsaddam.wmv][color=#0000ff]/doc/12b369 659b6648d7c1c74661.html /capsaddam.wmv[/color][/url]"##1 WindowsMediaPlayer.enabled = 可用返回或设置控件是否可用##1 WindowsMediaPlayer.fullScreen = 全屏模式返回或设置控件是否使用全屏幕模式##1 WindowsMediaPlayer.enableContextMenu = 菜单可用返回或设置在Windows Media Player控件界面中是否使用菜单##1 WindowsMediaPlayer.uiMode = 界面模式返回或设置控件界面的模式,可以为以下文本型常量之一:"invisible"、#隐藏所有;"none"、#只显示视频或者音频效果;"mini"、#MINI模式;"full"、#完整模式;"custom"、#自定义效果##1 WindowsMediaPlayer.stretchToFit = 自适应尺寸返回或设置视频大小是否适应控件大小##1 WindowsMediaPlayer.windowlessVideo = 无窗口模式返回或设置控件播放视频是否在无窗口模式##1 WindowsMediaPlayer.isRemote = 远程模式返回播放器是否在远程方式下运行##0 WindowsMediaPlayer.GetplayerApplication = Notuseful 获取播放程序对象##1 WindowsMediaPlayer.openPlayer = 打开播放器使用指定的URL连接来打开Windows Media Player主程序##1 WindowsMediaPlayer.openPlayer.bstrURL = URL例如:"c:\1.mp3","[url=/doc/12b369659b6648d7c1 c74661.html /video.wmv][color=#0000ff]/doc/12b369659b6648d7c1c 74661.html /video.wmv[/color][/url]"##1 WindowsMediaPlayer.SetcurrentMedia = 置当前媒体设置当前媒体对象##1 WindowsMediaPlayer.SetcurrentMedia.属性值= 媒体对象媒体对象##1 WindowsMediaPlayer.SetcurrentPlaylist = 置当前播放列表设置当前播放列表##1 WindowsMediaPlayer.SetcurrentPlaylist.属性值 = 播放列表播放列表对象##1 _WMPOCXEvents.OpenStateChange = 打开状态被改变当前打开状态被改变的时候触发此事件##1 _WMPOCXEvents.OpenStateChange.NewState = 新的状态使用"打开状态"枚举常量##1 _WMPOCXEvents.PlayStateChange = 播放状态被改变当播放状态属性被改变的时候触发此事件##1 _WMPOCXEvents.PlayStateChange.NewState = 新的状态请参见"播放状态"枚举常量##1 _WMPOCXEvents.AudioLanguageChange = 音频语言被改变当音频语言被改变的时候触发此事件##1_/doc/12b369659b6648d7c1c74661.html ngID = 语言标识新的语言的标识(LCID)##1 _WMPOCXEvents.StatusChange = 状态被改变当前状态属性被改变的时候触发此事件##0 _WMPOCXEvents.ScriptCommand = NotusefulSent when a synchronized command or URL is received##0 _WMPOCXEvents.NewStream = NotusefulSent when a new stream is started in a channel##0 _WMPOCXEvents.Disconnect = NotusefulSent when the control is disconnected from the server##1 _WMPOCXEvents.Buffering = 正在缓冲本时间在Windows Media Player控件缓冲或下载,并且在缓冲开始或结尾部分时触发。
用WindowsMedia player进行音(视)频直播

用WindowsMedia player进行音(视)频直播Windows Media Services 9.0(Windows .Net Server自带,类似于IIS的安装)、Windows Media Encoder 9.0 安装流媒体软件:1. 安装Windows Media Services首先安装Windows 2003 Server或者Windows .Net Server,然后打开“开始-控制面板-管理工具-管理您的服务器”或“开始-控制面板-添加或删除程序-添加/删除Windows组件”(建议使用第二种),首先安装IIS服务器(具体安转根据向导);添加IIS完毕后,再次启动添加/删除Windows组件程序,并勾取Windows Media Service项,单击详细信息,在其中选择“用于Web的Windows Media Services Administrator”以启动Windows Media Services 的Web管理功能(2000中可能没有这些选项,只需要安装Windows Media Services即可);2. 安装Windows Media Encoder从微软网站下载Windows Media Encoder 9.0(Windows Media Encoder 9.0无法在.Net Server下工作)进行安装,至此,Windows Media服务的服务器和编码器都已经具备;3. 建议,Windows Media Services与Windows Media Encoder安装在不同的服务器上,以减小服务器压力,当然也可以装载同一台机器上WMS(Windows Media Services)服务器配置:因为被解决方案是将Windows Media Services与Windows Media Encoder安装在不同的服务器上,且是在Windows Media Encoder上建立的发布点,所以要在Windows Media Services服务器上做好如下设置:1、必须在服务器上启用WMS HTTP 服务器控制协议插件,启用方法:打开Windows Media Services 管理器,点击服务器节点(以计算机名命名的节点),在右边点击“属性”选项卡,在下面显示的左框中选择“控制协议”,右框中显示相应的所属项,右键“WMS HTTP控制协议”-》“属性”菜单,选择相应的IP地址(例如:192.168.0.154),并更改相应的端口(因为考虑到网站和该服务器可能在同一台服务器上,所以不占用80端口【作为IIS的端口】,我使用的是8086端口,也可输入其他的没有被占用的端口号),然后确定,并启用“WMS HTTP控制协议”。
WindowsMediaPlayer网页播放器及其参数含义
WindowsMediaPlayer网页播放器及其参数含义网页中WMP视频控制之使用指南——播放方法和属性除播放、暂停、停止外,媒体播放器还可用下面的属性:扫描(Scanning)——与录像机的快进快倒功能类似;搜索(Seeking)——直接移到剪辑中标记的特定上演时间;——播放媒体播放器提供了两种技术来指定要播放的媒体名称(剪辑),你可以设置 FileName 属性,或调用 Open 方法。
如果 AutoStart 属性的值是 true 的话,当 FileName 属性被设置成该电影剪辑的 URL 后,该电影剪辑将开始播放;否则电影剪辑不会开始播放,除非你调用Play 方法。
Open 方法开始播放是异步的,它不象Play 方法要等到其他的进程结束后才开始播放。
媒体播放器提供了下面的类似录像机的属性和方法来控制流媒体的播放:Play、Stop、Pause 方法,来开始、停止、暂停流媒体。
PlayCount 属性,设置文件播放的次数。
AutoRewind 属性,确定当停止播放时是否返回到电影剪辑的开始部分。
——音频控制媒体播放器提供了下面的属性来管理音频:Balance 属性,确定左右音箱的声音平衡;Volume 属性,用来加大或降低音量;Mute 属性,用来关闭或打开声音;※你可以将 ShowAudioControls 属性设为 true 来在控制栏添加处理声音的控件。
——扫描媒体播放器提供了下面的属性用以扫描:FastForward 方法,快进;FastReverse 方法,快倒;Rate属性,改变播放速率;※要想使电影剪辑能被扫描,必须将 CanScan 和 AllowScan 属性设为 true。
——搜索用于搜索的属性有:MarkerCount 属性,指剪辑中标记的总数量;CurrentMaker、GetMarkerName、GetMarkerTime 方法,用于返回标记信息;MarkerHit 事件,当遇到标记时触发;CurrentPosition 属性,当前位置(用秒度量),可用来将播放头移到剪辑中指定的点;PositionChange 事件,当设置 CurrentPosition 属性时触发;※要想搜索到任意的时间,必须将 CanSeek 属性设为 true,要想搜索到标记点,必须将 CanSeekToMarkers 属性设为 true。
如何使用WindowsMediaPlayer进行音乐和视频播放
如何使用WindowsMediaPlayer进行音乐和视频播放第一章:WindowsMediaPlayer的介绍WindowsMediaPlayer是由微软公司开发的一款媒体播放软件,它支持播放音乐和视频文件,并提供了丰富的功能和调节选项,适用于Windows操作系统。
通过WindowsMediaPlayer,用户可以方便地播放各种格式的音乐和视频文件,同时还可以管理和组织自己的媒体库。
第二章:安装和启动WindowsMediaPlayer要使用WindowsMediaPlayer播放音乐和视频文件,首先需要安装该软件。
用户可以在微软官方网站上下载安装程序,然后按照安装提示进行操作。
安装完成后,在开始菜单中可以找到WindowsMediaPlayer的快捷方式。
双击快捷方式或者在搜索栏中输入“WindowsMediaPlayer”,即可启动该软件。
第三章:添加媒体文件到WindowsMediaPlayer在WindowsMediaPlayer的界面中,可以通过多种方式添加音乐和视频文件到媒体库。
首先,可以通过“文件”菜单中的“添加到库”选项,选择要添加的文件或者文件夹。
其次,还可以直接将文件拖拽到WindowsMediaPlayer的主界面。
添加完成后,所有的媒体文件都会被组织到媒体库中。
第四章:播放音乐文件在媒体库中选择一首音乐文件,双击该文件,或者点击播放按钮,WindowsMediaPlayer就会开始播放该音乐文件。
播放过程中,可以使用播放控制按钮进行暂停、停止、上一个曲目、下一个曲目等操作。
此外,可以通过音量控制按钮调节音量大小,通过进度条控制按钮快进和快退。
第五章:播放视频文件在媒体库中选择一个视频文件,双击该文件,或者点击播放按钮,WindowsMediaPlayer就会开始播放该视频文件。
与音乐文件播放类似,可以使用播放控制按钮进行暂停、停止、上一个视频、下一个视频等操作。
调节音量和进度的方式也与音乐播放一致。
Windows Media Player——axWindowsMediaPlayer控件研究
Windows Media Player控件研究初级问题:我的那个定时提醒程序中要用到它,初步使用问题已解决。
基本使用步骤如下:一、往控件箱中添加此控件:wmp.dll二、往窗体上拖控件三、wmp.URL=XXXX;wmp.play()即可。
平常应用就这三步就OK了。
但是,我想写个播放器的话,就遇到了一些问题。
在dotnet中使用非基于dotnet的控件,需要做一些额外的事,不过这些事vs已经帮我们做好了,当我们拖了此控件进窗体时,vs会自动调用AxImp.exe,用它根据原有的dll或ocx 生成一个用AxHost类包装的新的一组程序集(更为精确的描述见msdn),于是根据WMPLib.dll生成两个文件:AxInterop.WMPLib.dll、Interop.WMPLib.dll。
这两个文件中包含了转化后的类。
包装后的控件继承自System.Windows.Forms.AxHost。
这是第一个问题,控件怎么使用呢?如果是拖控件,很简单,无论如何都能有效的使用。
但是,如果手工new创建控件的实例呢?那就不一定了。
我做过种种实验,获得如下的结论:在非可视化类中无法创建有UI的控件的实例,或者是在没有把实例加入到一个可视化的容器中时。
我实验了下面的代码:AxWMPLib.AxWindowsMediaPlayer wmp = new AxWMPLib.AxWindowsMediaPlayer(); this.Controls.Add(wmp); wmp.URL = "约定.mp3"; wmp.Ctlcontrols.play();这几行代码不一定能运行。
发现,如果这几行代码写在窗体的构造函数中,哪怕show出来都不能运行,只有写在Load或Load之后的事件中,并且把窗体show出来才有运行,否则会抛出一个错误:引发类型为“System.Windows.Forms.AxHost+InvalidActiveXStateException”的异常。
AxWindowsMediaPlayer的详细用法
AxWindowsMediaPlayer的详细用法属性/方法名:说明:[基本属性]URL:String; 指定媒体位置,本机或网络地址uiMode:String; 播放器界面模式,可为Full, Mini, None, Invisible playState:integer; 播放状态,1=停止,2=暂停,3=播放,6=正在缓冲,9=正在连接,10=准备就绪enableContextMenu:Boolean; 启用/禁用右键菜单fullScreen:boolean; 是否全屏显示[controls] wmp.controls //播放器基本控制controls.play; 播放controls.pause; 暂停controls.stop; 停止controls.currentPosition:double; 当前进度controls.currentPositionString:string; 当前进度,字符串格式。
如“00:23”controls.fastForward; 快进controls.fastReverse; 快退controls.next; 下一曲controls.previous; 上一曲[settings] wmp.settings //播放器基本设置settings.volume:integer; 音量,0-100settings.autoStart:Boolean; 是否自动播放settings.mute:Boolean; 是否静音settings.playCount:integer; 播放次数[currentMedia] wmp.currentMedia //当前媒体属性currentMedia.duration:double; 媒体总长度currentMedia.durationString:string; 媒体总长度,字符串格式。
如“03:24”currentMedia.getItemInfo(const string); 获取当前媒体信息"Title"=媒体标题,"Author"=艺术家,"Copyright"=版权信息,"Description"=媒体内容描述,"Duration"=持续时间(秒),"FileSize"=文件大小,"FileType"=文件类型,"sourceURL"=原始地址currentMedia.setItemInfo(const string); 通过属性名设置媒体信息:string; 同currentMedia.getItemInfo("Title")[currentPlaylist] wmp.currentPlaylist //当前播放列表属性currentPlaylist.count:integer; 当前播放列表所包含媒体数currentPlaylist.Item[integer]; 获取或设置指定项目媒体信息,其子属性同wmp.currentMediaAxWindowsMediaPlayer控件的属MediaPlayer1.Play播放MediaPlayer1.Stop停止MediaPlayer1.Pause暂停MediaPlayer1.PlayCount文件播放次数MediaPlayer1.AutoRewind是否循环播放MediaPlayer1.Balance声道MediaPlayer1.Volume音量MediaPlayer1.Mute静音MediaPlayer1.EnableContextMenu是否允许在控件上点击鼠标右键时弹出快捷菜单MediaPlayer1.AnimationAtStart是否在播放前先播放动画MediaPlayer1.ShowControls是否显示控件工具栏MediaPlayer1.ShowAudioControls是否显示声音控制按钮MediaPlayer1.ShowDisplay是否显示数据文件的相关信息MediaPlayer1.ShowGotoBar是否显示Goto栏MediaPlayer1.ShowPositionControls是否显示位置调节按钮MediaPlayer1.ShowStatusBar是否显示状态栏MediaPlayer1.ShowTracker是否显示进度条MediaPlayer1.FastForward快进Note Installing this SDK does not install Windows Media Player or Windows Media Player Mobile. You must have Windows Media Player installed to use the material in this SDK. Windows Media Player Mobile is a part of Windows Mobile, which is only available on a Pocket PC orSmartphone supplied by a device manufacturer or mobile operator.。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
AxWindowsMediaPlayer的详细用法属性/方法名:说明:[基本属性]URL:String; 指定媒体位置,本机或网络地址uiMode:String; 播放器界面模式,可为Full, Mini, None, InvisibleplayState:integer; 播放状态,1=停止,2=暂停,3=播放,6=正在缓冲,9=正在连接,10=准备就绪enableContextMenu:Boolean; 启用/禁用右键菜单fullScreen:boolean; 是否全屏显示[controls] wmp.controls //播放器基本控制controls.play; 播放controls.pause; 暂停controls.stop; 停止controls.currentPosition:double; 当前进度controls.currentPositionString:string; 当前进度,字符串格式。
如“00:23”controls.fastForward; 快进controls.fastReverse; 快退controls.next; 下一曲controls.previous; 上一曲[settings] wmp.settings //播放器基本设置settings.volume:integer; 音量,0-100settings.autoStart:Boolean; 是否自动播放settings.mute:Boolean; 是否静音settings.playCount:integer; 播放次数[currentMedia] wmp.currentMedia //当前媒体属性currentMedia.duration:double; 媒体总长度currentMedia.durationString:string; 媒体总长度,字符串格式。
如“03:24”currentMedia.getItemInfo(const string); 获取当前媒体信息"Title"=媒体标题,"Author"=艺术家,"Copyright"=版权信息,"Description"=媒体内容描述,"Duration"=持续时间(秒),"FileSize"=文件大小,"FileType"=文件类型,"sourceURL"=原始地址currentMedia.setItemInfo(const string); 通过属性名设置媒体信息:string; 同currentMedia.getItemInfo("Title")[currentPlaylist] wmp.currentPlaylist //当前播放列表属性currentPlaylist.count:integer; 当前播放列表所包含媒体数currentPlaylist.Item[integer]; 获取或设置指定项目媒体信息,其子属性同wmp.currentMedia AxWindowsMediaPlayer控件的属性MediaPlayer1.Play播放MediaPlayer1.Stop停止MediaPlayer1.Pause暂停MediaPlayer1.PlayCount文件播放次数MediaPlayer1.AutoRewind是否循环播放MediaPlayer1.Balance声道MediaPlayer1.Volume音量MediaPlayer1.Mute静音MediaPlayer1.EnableContextMenu是否允许在控件上点击鼠标右键时弹出快捷菜单MediaPlayer1.AnimationAtStart是否在播放前先播放动画MediaPlayer1.ShowControls是否显示控件工具栏MediaPlayer1.ShowAudioControls是否显示声音控制按钮MediaPlayer1.ShowDisplay是否显示数据文件的相关信息MediaPlayer1.ShowGotoBar是否显示Goto栏MediaPlayer1.ShowPositionControls是否显示位置调节按钮MediaPlayer1.ShowStatusBar是否显示状态栏MediaPlayer1.ShowTracker是否显示进度条MediaPlayer1.FastForward快进MediaPlayer1.FastReverse快退MediaPlayer1.Rate快进/快退速率MediaPlayer1.AllowChangeDisplaySize是否允许自由设置播放图象大小MediaPlayer1.DisplaySize设置播放图象大小1-MpDefaultSize原始大小2-MpHalfSize原始大小的一半3-MpDoubleSize原始大小的两倍4-MpFullScreen全屏5-MpOneSixteenthScreen屏幕大小的1/166-MpOneFourthScreen屏幕大小的1/47-MpOneHalfScreen屏幕大小的1/2MediaPlayer1.ClickToPlay是否允许单击播放窗口启动Media Player AxWindowsMediaPlayer常用属性2008-03-18 21:282. Ctlcontrols属性Ctlcontrols属性是AxWindowsMediaPlayer的一个重要属性,此控件中有许多常用成员。
(1) 方法play用于播放多媒体文件,其格式为:窗体名.控件名.Ctlcontrols.play()如:AxWindowsMediaPlayer1.Ctlcontrols.play() …此处缺省窗体名是Me(2) 方法pause用于暂停正在播放的多媒体文件,其格式为:窗体名.控件名.Ctlcontrols.pause()如:AxWindowsMediaPlayer1.Ctlcontrols.pause() (3) 方法stop用于停止正在播放的多媒体文件,其格式为:窗体名.控件名.Ctlcontrols.stop()如:AxWindowsMediaPlayer1.Ctlcontrols.stop() (4) 方法fastforward用于将正在播放的多媒体文件快进,其格式为:窗体名.控件名.Ctlcontrols.fastforward()如:AxWindowsMediaPlayer1.Ctlcontrols.forward()(5) 方法fastreverse窗体名.控件名.Ctlcontrols.fastreverse()如:AxWindowsMediaPlayer1.Ctlcontrols.fastreverse ()6. 属性CurrentPosition用于获取多媒体文件当前的播放进度,其值是数值类型,使用格式为:窗体名.控件名.Ctlcontrols.currentPositiond1=AxWindowsMediaPlayer1.Ctlcontrols.currentPosi tion其中d1 是一个整型变量。
7. 属性Duration用于获取当前多媒体文件的播放的总时间,其值为数值类型,其使用格式为:窗体名.控件名.currentMedia.duration如:d2=AxWindowsMediaPlayer1.currentMedia.duration其中d2是一个整型变量。
controls.currentPositionString:string; 当前进度,字符串格式。
如“00:23”属性/方法名:说明:[基本属性]URL:String; 指定媒体位置,本机或网络地址uiMode:String; 播放器界面模式,可为Full, Mini,None, InvisibleplayState:integer; 播放状态,1=停止,2=暂停,3=播放,6=正在缓冲,9=正在连接,10=准备就绪player.PlayStateChange += newAxWMPLib._WMPOCXEvents_PlayStateChangeEventHandler(player_PlayStateChange);private void player_PlayStateChange(object sender,AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e){// Test the current state of the player and display a message for each state. switch (e.newState){case 0: // UndefinedcurrentStateLabel.Text = "Undefined";break;case 1: // StoppedcurrentStateLabel.Text = "Stopped";break;case 2: // PausedcurrentStateLabel.Text = "Paused";break;case 3: // PlayingcurrentStateLabel.Text = "Playing";break;case 4: // ScanForwardcurrentStateLabel.Text = "ScanForward";break;case 5: // ScanReversecurrentStateLabel.Text = "ScanReverse";break;case 6: // BufferingcurrentStateLabel.Text = "Buffering";break;case 7: // WaitingcurrentStateLabel.Text = "Waiting";break;case 8: // MediaEndedcurrentStateLabel.Text = "MediaEnded";break;case 9: // TransitioningcurrentStateLabel.Text = "Transitioning";break;case 10: // ReadycurrentStateLabel.Text = "Ready";break;case 11: // ReconnectingcurrentStateLabel.Text = "Reconnecting";break;case 12: // LastcurrentStateLabel.Text = "Last";break;default:currentStateLabel.Text = ("Unknown State: " + e.newState.ToString()); break;}}enableContextMenu:Boolean; 启用/禁用右键菜单fullScreen:boolean; 是否全屏显示controls.currentPosition:double; 当前进度controls.fastForward; 快进controls.fastReverse; 快退controls.next; 下一曲controls.previous; 上一曲[settings] wmp.settings //播放器基本设置settings.volume:integer; 音量,0-100settings.autoStart:Boolean; 是否自动播放settings.mute:Boolean; 是否静音settings.playCount:integer; 播放次数[currentMedia] wmp.currentMedia //当前媒体属性currentMedia.duration:double; 媒体总长度currentMedia.durationString:string; 媒体总长度,字符串格式。