close
參考:
http://www.dotblogs.com.tw/chou/archive/2010/06/29/16263.aspx


以下為JKfix OK

1.全螢幕 下 可以單首mv循環播放
2.全螢幕下 如果是不同mv切換 會有跳出全螢幕的狀況 只能重新安排切入全螢幕模式 所以會有切換的畫面
'==========================================================

Dim path As String = "c:/video_home/r.mpg"
Dim path_pre As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

'If OpenFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
' path = OpenFileDialog1.FileName
'End If


'Dim path1 = "c:/video_home/r.mpg"
'Dim path2 = "c:/video_home/g.mpg"
'If path = path1 Then
' path = path2
'Else
' path = path1
'End If

If path <> path_pre Then
AxWindowsMediaPlayer1.URL = path
AxWindowsMediaPlayer1.Ctlcontrols.play() '必須不偵錯的啟動 才會跑
AxWindowsMediaPlayer1.settings.setMode("loop", True)
path_pre = path

If Me.AxWindowsMediaPlayer1.playState = WMPLib.WMPPlayState.wmppsPlaying Then
' 才能設定全螢幕播放
Me.AxWindowsMediaPlayer1.fullScreen = True
End If
End If

'--------------------------


End Sub



Private Sub AxWindowsMediaPlayer1_PlayStateChange(ByVal sender As System.Object, ByVal e As AxWMPLib._WMPOCXEvents_PlayStateChangeEvent) Handles AxWindowsMediaPlayer1.PlayStateChange

' 判斷當狀態是 WMPLib.WMPPlayState.wmppsPlaying 撥放狀態

If DirectCast(e.newState, WMPLib.WMPPlayState) = WMPLib.WMPPlayState.wmppsPlaying Then

' 設定以全螢幕播放
Me.AxWindowsMediaPlayer1.fullScreen = True

End If

End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Button1.PerformClick()

End Sub
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 prague12 的頭像
    prague12

    prague12

    prague12 發表在 痞客邦 留言(0) 人氣()