Solved

The Multimedia control

Posted on 1998-07-26
1
152 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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
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…

762 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

11 Experts available now in Live!

Get 1:1 Help Now