469,609 Members | 1,732 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

Multiple instances of WM Player on WinForm

After installing the Media SDK and looking at the vb sample I was able to
create a control that includes the media player plus other form controls. I
want to add multiple instances of this control to a windows form. I was able
to get this to work...almost. The problem I have is that after adding mutiple
instances of the control by pressing a button, the videos try to play at the
same time on the first instance of the control. The stop, mute start buttons
on the second control work but control the second video that is trying to
play on the first instance.

Here is code that initializes the control instances

Select Case e.Tool.Key
Case "Add"
Select Case Panel1.Controls.Count
Case 0
Dim vp As New VideoPoint.VideoControl("C:\Documents
and Settings\All Users\Documents\My Videos\video1.mpg")
vp.WMPlayer.URL = vp.VideoName
Me.Panel1.Controls.Add(vp)
Case 1
Dim vp1 As New VideoPoint.VideoControl("C:\Documents
and Settings\All Users\Documents\My Videos\video2.asf")
vp1.WMPlayer.URL = vp1.VideoName
Me.Panel1.Controls.Add(vp1)
End Select

I pass in the name of the video when I create the control and then have a
property videoname that passes the video string to the url property.

WMPlayer is a public property that returns the player on the control.

Panel 1 has a flow layout so that each control location is controlled by the
flow control.
Feb 26 '06 #1
0 1020

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.