首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

怎么在vc中把windows Media Player控件中的一些功能删除

2012-03-19 
如何在vc中把windows Media Player控件中的一些功能删除如何在vc中把windows Media Player控件中的一些功

如何在vc中把windows Media Player控件中的一些功能删除
如何在vc中把windows Media Player控件中的一些功能删除,例如把播放,暂停,快进,快退等功能去掉。
然后自己添加按钮来实现这些功能。
请问如何实现?

[解决办法]
没用过windows Media Player控件
不过听上去好像是需要重载自绘
[解决办法]
慢慢来。。。也在研究这块,共勉。。。顺便顶一下,以期更多前辈来分享自己经验!
[解决办法]
你可以对AxWindowsMediaPlayer.uiMode 属性进行修改来改变播放器的模式。uiMode提供四种值。invisible;none;mini;full。

for Examples
The following example creates a list box that allows the user to change the user interface mode for an embedded Windows Media Player object. The AxWMPLib.AxWindowsMediaPlayer object is represented by the variable named player.

[code=C/C++][/code]
// Load the list box with the four UI mode options.
uiModeOptions.Items.Add("invisible");
uiModeOptions.Items.Add("none");
uiModeOptions.Items.Add("mini");
uiModeOptions.Items.Add("full");


private void uiModeOptions_OnSelectedIndexChanged(object sender, System.EventArgs e)
{
// Get the selected UI mode in the list box as a string.
string newMode = (string)(((System.Windows.Forms.ListBox)sender).SelectedItem);

// Set the UI mode that the user selected.
player.uiMode = newMode;
}
[解决办法]
' Load the list box with the four UI mode options.
uiModeOptions.Items.Add("invisible")
uiModeOptions.Items.Add("none")
uiModeOptions.Items.Add("mini")
uiModeOptions.Items.Add("full")


Public Sub uiModeOptions_OnSelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles uiModeOptions.SelectedIndexChanged

' Get the selected UI mode in the list box as a string.
Dim lb As System.Windows.Forms.ListBox = sender
Dim newMode As String = lb.SelectedItem

' Set the UI mode that the user selected.
player.uiMode = newMode

End Sub

热点排行