Results 1 to 3 of 3

Thread: Playing a MP3

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Texas
    Posts
    313

    Question

    How can I play a mp3 useing vb6?

  2. #2
    Fanatic Member Dim's Avatar
    Join Date
    Jul 2000
    Posts
    620
    Take a look at this thread.

    Gl,
    D!m
    Dim

  3. #3
    Guest

    Talking Yup.

    You might want to try the Multimedia Control, or use the winAPI of the mciSendCommand() API, which is:
    Code:
    Public Declare Function mciSendCommand Lib "winmm.dll" Alias "mciSendCommandA" (ByVal wDeviceID As Long, ByVal uMessage As Long, ByVal dwParam1 As Long, ByVal dwParam2 As Any) As Long
    
    Sub Playsnd(ByVal file as String)
        mciSendString("close all", 0, 0, 0)
        mciSendString("open " & file & " type Other alias background", 0, 0, 0)
        mciSendString("play background", 0, 0, Form1.hWnd)
    End Sub
    Commands that you can use:
    MCI_BREAK
    MCI_CAPTURE
    MCI_CLOSE
    MCI_CONFIGURE
    MCI_COPY
    MCI_CUE
    MCI_CUT
    MCI_DELETE
    MCI_ESCAPE
    MCI_FREEZE
    MCI_GETDEVCAPS
    MCI_INDEX
    MCI_INFO
    MCI_LIST
    MCI_LOAD
    MCI_MARK
    MCI_MONITOR
    MCI_OPEN
    MCI_PASTE
    MCI_PAUSE
    MCI_PLAY
    MCI_PUT
    MCI_QUALITY
    MCI_REALIZE
    MCI_RECORD
    MCI_RESERVE
    MCI_RESTORE
    MCI_RESUME
    MCI_SAVE
    MCI_SEEK
    MCI_SET
    MCI_SETAUDIO
    MCI_SETTIMECODE
    MCI_SETTUNER
    MCI_SETVIDEO
    MCI_SIGNAL
    MCI_SPIN
    MCI_STATUS
    MCI_STEP
    MCI_STOP
    MCI_SYSINFO
    MCI_UNDO
    MCI_UNFREEZE
    MCI_UPDATE
    MCI_WHERE
    MCI_WINDOW

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width