2. 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.currentPosition
d1 =AxWindowsMediaPlayer1.Ctlcontrols.currentPosition
其中d1 是一个整型变量。
7. 属性Duration
用于获取当前多媒体文件的播放的总时间,其值为数值类型,其使用格式为:
窗体名.控件名.currentMedia.duration
如:d2 =AxWindowsMediaPlayer1.currentMedia.duration
其中d2是一个整型变量。