Determine the total playing time of an Audio CD

The Microsoft Multimedia Control lets you easily determine the total playing time of an Audio CD: you only need to correctly initialize the control and then decipher the value returned by its Length property. Use the following code as a guideline for your routines:

Private Sub cmdDisplayTime_Click()    Dim Value As Integer    Dim TotalTime As String        With MMControl1        ' Initialize the Multimedia control        .DeviceType = "CDAudio"        .TimeFormat = 10        .Command = "Open"        ' seconds are held in the most significant byte        Value = (.Length  256) And 255        TotalTime = Right$("0" & CStr(Value), 2) & """"        ' minutes are held in the least significant byte        Value = (.Length And 255) Mod 60        TotalTime = Right$("0" & CStr(Value), 2) & "' " & TotalTime        Value = (.Length And 255)  60        If Value > 0 Then            ' display hour value only if necessary            TotalTime = CStr(Value) & "h " & TotalTime        End If        MsgBox TotalTime    End With    End Sub

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

The Latest

iOS app development

The Future of iOS App Development: Trends to Watch

When it launched in 2008, the Apple App Store only had 500 apps available. By the first quarter of 2022, the store had about 2.18 million iOS-exclusive apps. Average monthly app releases for the platform reached 34,000 in the first half of 2022, indicating rapid growth in iOS app development.

microsoft careers

Top Careers at Microsoft

Microsoft has gained its position as one of the top companies in the world, and Microsoft careers are flourishing. This multinational company is efficiently developing popular software and computers with other consumer electronics. It is a dream come true for so many people to acquire a high paid, high-prestige job

your company's audio

4 Areas of Your Company Where Your Audio Really Matters

Your company probably relies on audio more than you realize. Whether you’re creating a spoken text message to a colleague or giving a speech, you want your audio to shine. Otherwise, you could cause avoidable friction points and potentially hurt your brand reputation. For example, let’s say you create a