29-03-13, 02:26 AM
كود :
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Try
TrackBar2.Value = Convert.ToInt32((AxRealAudio1.GetPosition / AxRealAudio1.GetPosition) * 100)
Catch ex As Exception
End Try
End Sub
Private Sub TrackBar2_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar2.Scroll
If AxRealAudio1.GetPosition <> 0 Then
Dim a As Double = Me.TrackBar2.Value / Me.TrackBar2.Maximum
AxRealAudio1.SetPosition(AxRealAudio1.GetPosition * a)
Else
Me.TrackBar2.Value = 0
End If