Solved

The Multimedia control

Posted on 1998-07-26
1
153 Views
Last Modified: 2010-05-03
I'm using VB4.0-32 if that makes a difference.  I'm playing around with a cd player.  Everything is working beautifully, execpt, I can't find out what track is currently playing when the program is loaded, assuming that a music cd is currently playing and no other program has control of the cd rom.  I have the timeformat set to 10 (TMSF) and if I read the mmcontrol1.position, I get a number that appears to be random, say 6 to 10 digits.  Whatever it is, it's not in the TMSF format like the help file says it should be.  I'm assuming that I need to convert the number the position property is giving me.  Thanks in advance.
0
Comment
Question by:bilcrete
1 Comment
 
LVL 3

Accepted Solution

by:
SPECIALIST earned 100 total points
ID: 1466716
Try this


Sub MMControl1_StatusUpdate ()

        Debug.Print "Mode = "; MMControl1.Mode
        Select Case MMControl1.Mode
       Case MCI_MODE_OPEN
       '      'whatever...
       Case MCI_MODE_STOP
       '      'whatever...
       Case MCI_MODE_PLAY
        If giOldTrack  (MMControl1.Position And &HFF) Then
       giCurrentTrack = (MMControl1.Position And &HFF)

              If giKTELCD Then DisplayKTELFeaturedArtist(giCurrentTrack)
                     giOldTrack = giCurrentTrack
                     b3dPlay.Caption = "Sto&p"
                      End If
                      End Select
              End Sub


0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now