'用一个label何一个shape实现的.label的长度为4000便于计算,由于时间关系有些变量何api的声明我就不写了,可能会有报错,还望楼主自己解决:)
Private Sub Label8_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
lenght = Shape1.Width'lenght是个定义好的变量
If Button = vbLeftButton Then
If playing Or rmplaying Then
If X > 0 And X < 4000 Then
Dim lnglength As Long
Shape1.Width = X
Dim cmtmp As String '命令临时变量
lnglength = (Shape1.Width / 4000) * length
cmtmp = "seek " & "mp3 " & "to " & lnglength '查找到指定得位置
mciSendString cmtmp, vbNull, 0, 0
mciSendString "play mp3", vbNull, 0, 0
End If
lnglength = 0
End If
End If
End Sub
Private Sub Pic_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
Pic.Left = Pic.Left + X
lbl.Width = Pic.Left - lbl.Left
End If
End Sub