C#代码转VB.Net代码
privatevoidwmp_PlayStateChange(objectsender,AxWMPLib._WMPOCXEvents_PlayStateChangeEve...
private void wmp_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
{
if ((WMPLib.WMPPlayState)e.newState == WMPLib.WMPPlayState.wmppsReady) wmp.Ctlcontrols.play();
}
private void axWindowsMediaPlayer1_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
{
if (axWindowsMediaPlayer1.playState == WMPLib.WMPPlayState.wmppsMediaEnded)
{
this.axWindowsMediaPlayer1.currentPlaylist.clear();
this.axWindowsMediaPlayer1.currentPlaylist.appendItem(this.axWindowsMediaPlayer1.newMedia(@"f:\b.wmv"));
axWindowsMediaPlayer1.settings.setMode("loop", true);
timer1.Enabled = true;
}
}
private void timer1_Tick(object sender, EventArgs e)
{
timer1.Enabled = false;
axWindowsMediaPlayer1.Ctlcontrols.play();
} 展开
{
if ((WMPLib.WMPPlayState)e.newState == WMPLib.WMPPlayState.wmppsReady) wmp.Ctlcontrols.play();
}
private void axWindowsMediaPlayer1_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
{
if (axWindowsMediaPlayer1.playState == WMPLib.WMPPlayState.wmppsMediaEnded)
{
this.axWindowsMediaPlayer1.currentPlaylist.clear();
this.axWindowsMediaPlayer1.currentPlaylist.appendItem(this.axWindowsMediaPlayer1.newMedia(@"f:\b.wmv"));
axWindowsMediaPlayer1.settings.setMode("loop", true);
timer1.Enabled = true;
}
}
private void timer1_Tick(object sender, EventArgs e)
{
timer1.Enabled = false;
axWindowsMediaPlayer1.Ctlcontrols.play();
} 展开
2个回答
展开全部
Private Sub wmp_PlayStateChange(sender As Object, e As AxWMPLib._WMPOCXEvents_PlayStateChangeEvent)
If DirectCast(e.newState, WMPLib.WMPPlayState) = WMPLib.WMPPlayState.wmppsReady Then
wmp.Ctlcontrols.play()
End If
End Sub
Private Sub axWindowsMediaPlayer1_PlayStateChange(sender As Object, e As AxWMPLib._WMPOCXEvents_PlayStateChangeEvent)
If axWindowsMediaPlayer1.playState = WMPLib.WMPPlayState.wmppsMediaEnded Then
Me.axWindowsMediaPlayer1.currentPlaylist.clear()
Me.axWindowsMediaPlayer1.currentPlaylist.appendItem(Me.axWindowsMediaPlayer1.newMedia("f:\b.wmv"))
axWindowsMediaPlayer1.settings.setMode("loop", True)
timer1.Enabled = True
End If
End Sub
Private Sub timer1_Tick(sender As Object, e As EventArgs)
timer1.Enabled = False
axWindowsMediaPlayer1.Ctlcontrols.play()
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询