2 Replies - 315 Views - Last Post: 30 January 2020 - 02:03 PM Rate Topic: -----

#1 mePutra   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 30-January 20

Playing Same Playlist Form to Form

Posted 30 January 2020 - 01:43 PM

Hello, can anyone help me, I have 1 axmediaplayer1 di form1
And 1 axmediaplayer1 di form2 (DISPLAY)

In form1 I have already have listbox1 with playlist open with OpenFiledialog1 to playing the video.
===============================================================================
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
        Try
            Dim item As Integer
            item = ListBox1.SelectedIndex
            If Me.AxWindowsMediaPlayer1.playState = WMPLib.WMPPlayState.wmppsStopped Then
                Me.ListBox1.SelectedIndex = item + 1
                AxWindowsMediaPlayer1.URL = ListBox1.SelectedItem
                Timer1.Start()
            Else
                Timer1.Start()
            End If
        Catch ex As Exception
	‘this is for video at ending list automatically back to first video
            AxWindowsMediaPlayer1.URL = ""
            ListBox1.SelectedIndex = "0"
            AxWindowsMediaPlayer1.URL = ListBox1.SelectedItem

        End Try
    End Sub


================================================================================
I have 1 [button] when I clicked with this code :
================================================================================
if AxWindowsMediaPlayer2.playState Then
            AxWindowsMediaPlayer2.Ctlcontrols.pause()
            AxWindowsMediaPlayer2.SendToBack() ‘and I have image to BringToFont
            DISPLAY.AxWindowsMediaPlayer1.URL = AxWindowsMediaPlayer2.URL
            DISPLAY.AxWindowsMediaPlayer1.Ctlcontrols.play()
            DISPLAY.AxWindowsMediaPlayer1.BringToFront()
 End If



================================================================================

Now video at form1 can play in form2 (DISPLAY) with same URL and video at form1 is pause.
My question is :
Can form2 (DISPLAY) play with that same playlist same like form1 ? when the video stop, DISPLAY. axmediaplayer1 playing the video automatically next playlist like Form1 ?

Sorry for my bad English

Thanks

This post has been edited by Martyr2: 30 January 2020 - 01:50 PM
Reason for edit:: [code]Please use code tags in the future[/code] Thanks!


Is This A Good Question/Topic? 0
  • +

Replies To: Playing Same Playlist Form to Form

#2 Martyr2   User is offline

  • Programming Theoretician
  • member icon

Reputation: 5519
  • View blog
  • Posts: 14,520
  • Joined: 18-April 07

Re: Playing Same Playlist Form to Form

Posted 30 January 2020 - 01:55 PM

I am not sure if you mean to have form2 play videos that are in a playlist on form1 or not. If you are talking about that, yes. You can share data between forms. I have two articles on my blog that talks about this sort of thing.

https://www.codersle...in-c-or-vb-net/
https://www.codersle...tes-and-events/

Hopefully one of these articles will help get the point across of how you can do it. There are probably a few other ways, but these methods are usually pretty good.
Was This Post Helpful? 0
  • +
  • -

#3 mePutra   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 30-January 20

Re: Playing Same Playlist Form to Form

Posted 30 January 2020 - 02:03 PM

Thanks mr.Martyr2, i'm sorry for that rules for the code, thanks for that articles, i will visit your blog... :bananaman: :scooter:
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1