Solved

The Multimedia control

Posted on 1998-07-26
1
154 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

777 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