Print Page | Close Window

windows media player

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=8221
Printed Date: 02 January 2025 at 9:48am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: windows media player
Posted By: gbattig
Subject: windows media player
Date Posted: 29 September 2007 at 2:32pm
Hi Guys, I am currently in the process of creating an app and need to show the windows media player as a custom control in the ribbon bar example that is shipped with the samples when you purchase the control, how do I do this? I know it is something to do with the

xtpControlCustom

Thanks,
Greg



Replies:
Posted By: gbattig
Date Posted: 29 September 2007 at 3:12pm
Hi Guys, I am trying to show a wmp player in the ribbon bar so far I have no luck here is the code I am using can you please shed some light?
 

GroupClipboard = TabPageLayout.Groups.AddGroup("&Video/Music", ID_GROUP_CLIPBOARD)

Dim MyMusicPlayer As XtremeCommandBars.CommandBarControlCustom

MyMusicPlayer = GroupClipboard.Add(XtremeCommandBars.XTPControlType.xtpControlCustom, 113, "Music player")

AxWindowsMediaPlayer1 = New AxWMPLib.AxWindowsMediaPlayer

AxWindowsMediaPlayer1.Visible = True

AxWindowsMediaPlayer1.Width = 300

AxWindowsMediaPlayer1.CreateControl()

MyMusicPlayer.Handle = AxWindowsMediaPlayer1.Handle.ToInt32()

 

Thanks,



Posted By: Oleg
Date Posted: 30 September 2007 at 9:28am
Hi,
 
Its ActiveX control and have to be put in .NET object, so create some panel, put ActiveX to panel and attach panel to group:
 
 

MediaPanel = New Panel()

MediaPanel.Size = New Size(200, 66)

Me.AxWindowsMediaPlayer1 = New AxWMPLib.AxWindowsMediaPlayer()

CType(Me.AxWindowsMediaPlayer1, System.ComponentModel.ISupportInitialize).BeginInit()

Me.AxWindowsMediaPlayer1.Name = "AxWindowsMediaPlayer1"

Me.AxWindowsMediaPlayer1.Size = New System.Drawing.Size(200, 66)

MediaPanel.Controls.Add(Me.AxWindowsMediaPlayer1)

CType(Me.AxWindowsMediaPlayer1, System.ComponentModel.ISupportInitialize).EndInit()

Dim MyMusicPlayer As XtremeCommandBars.CommandBarControlCustom

MyMusicPlayer = GroupClipboard.Add(XtremeCommandBars.XTPControlType.xtpControlCustom, 113, "Music player")

MediaPanel.CreateControl()

AxWindowsMediaPlayer1.CreateControl()

 MyMusicPlayer.Handle = MediaPanel.Handle.ToInt32()



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net