If StartPoint >= AxWindowsMediaPlayer1.currentMedia.duration Then
BtStartUp.Enabled = False
End If
End Sub
3)中止点控制区向下微调按钮鼠标单击事件核心代码
Private Sub BtEnd_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles BtEnd.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then '按右键取消,设置结束点为媒体长度
EndPoint = AxWindowsMediaPlayer1.currentMedia.duration
Else
EndPoint = AxWindowsMediaPlayer1.Ctlcontrols.currentPosition '按左键,设置结束点为当前值
End If
End Sub
4)中止点控制区向下微调按钮单击事件核心代码
Private Sub BtEndDown_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtEndDown.Click
EndPoint = EndPoint – 1 ‘每单击一次,开始递减一秒
If EndPoint < 0 Then‘如果结束点为文件开始,则向下微调按钮无效
BtSartDown.Enabled = False
End If
End Sub
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
|