5)中止点控制区向上微调按钮点击事件核心代码
Private Sub BtEndUp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtEndUp.Click
EndPoint = EndPoint + 1‘每点击一次,结束点增加一秒
If EndPoint >= AxWindowsMediaPlayer1.currentMedia.duration Then‘如果结束点为文件末,则向上微调按钮无效
BtEndUp.Visible = False
End If
End Sub
(7)播放控制区核心代码
1) “快进”按钮单击事件代码
Private Sub BtForward_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtForward.Click
AxWindowsMediaPlayer1.Ctlcontrols.currentPosition = AxWindowsMediaPlayer1.Ctlcontrols.currentPosition + NUDInterval.value
End Sub
2) “快退“按钮单击事件代码
Private Sub BtBackward_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtBackward.Click
AxWindowsMediaPlayer1.Ctlcontrols.currentPosition = AxWindowsMediaPlayer1.Ctlcontrols.currentPosition - NUDInterval.value
End Sub
3) “回到起点”按钮单击事件代码
Private Sub BtBackStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtBackStart.Click
AxWindowsMediaPlayer1.Ctlcontrols.currentPosition = 0
End Sub
4) “等距离跳进”按钮单击事件代码
Private Sub BtEqual_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtEqual.Click
Dim temp As Single
temp = EndPoint - StartPoint
StartPoint = EndPoint
EndPoint = EndPoint + temp
If EndPoint > AxWindowsMediaPlayer1.currentMedia.duration Then
EndPoint = AxWindowsMediaPlayer1.currentMedia.duration
End If
AxWindowsMediaPlayer1.Ctlcontrols.currentPosition = StartPoint
End Sub
|