我正在尝试使标签的时间每秒更改一次以匹配正在播放的媒体的时间。
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim remain As Int32 = AxWindowsMediaPlayer1.currentMedia.duration - AxWindowsMediaPlayer1.Ctlcontrols.currentPosition
Dim Minutes As String
Dim Secs As String
Dim ElapsedTime As String
Minutes = (remain / 60).ToString("00")
Secs = (remain Mod 60).ToString("00.00")
ElapsedTime = Minutes & "." & Secs
Label1.Text = ElapsedTime ' Display the remaining time for the .wav file in a label in mm:ss format
TrackBar2.Value = ElapsedTime (Error with this line: Conversion from string "11.26.00" to type 'Integer' is not valid.)
End Sub
我是否将字符串更改为整数?