回覆列表
  • 1 # 待花開南巷素兮

    它本身不久帶麼?

    載入控制元件COMMONCONTROLS裡面就有進度條。設定MIN和MAX上下限在設定VALUE即可

  • 2 # lanfengz3

    Private Sub Timer1_Timer()

    Dim t As Long

    Dim ret As String * 128

    Timer1.Interval = 1000

    t = mciSendString("status " + na + " position", ret, 128, 0) "得到當前播放位置

    ProgressBar1.Value = Val(ret)

    Label4.Caption = Gettime(Val(ret)) "顯示歌曲當前時間

    If ProgressBar1.Value = ProgressBar1.Max Then

    Command5_Click

    End If

    End Sub

    Private Function Gettime(position As Long) As String "這個函式的功能是把以長整型表示的時間轉換為電子鐘式的"**:**"

    Dim min, sec

    min = position / 1000

    min = min / 60

    sec = min - Int(min)

    min = Int(min)

    sec = 60 * sec / 100

    sec = Int(sec * 100)

    Gettime = Str(min) + ":" + Str(sec)

    End Function

    實在看不懂的話我把整個程式發給你

  • 中秋節和大豐收的關聯?
  • 供熱用電爐註冊商標屬於哪一類?