MCI Control and WAV files 
Author Message
 MCI Control and WAV files

Hi,
For great audio and multimedia support, you might consider grabbing the
FX Tools Gold Active X.  There is info and an eval here:
http://www.*-*-*.com/
Good luck,
jack
--
  |   Check out "BETTER JPEG" live: http://www.*-*-*.com/ ; |
  |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
  | Jack Berlin - Pegasus Imaging Corp - the BETTER JPEG people! |

  |--------------------------------------------------------------|
Quote:

> I am attempting to play a WAV file. I have setup the control correctly (I
> think). The problem is when I involk the MCI.command = "Play" method.
> Nothing happens (although the appropriate amount of time passes indicating
> it is trying to play). If I hit the rewind followed by the play buttons, it
> works OK. What I want is full programtical control. In otherwords, I wany to
> force it to play without user intervention. Any ideas anybody?

> Rick



Sat, 23 Dec 2000 03:00:00 GMT  
 MCI Control and WAV files

Quote:

> > I am attempting to play a WAV file. I have setup the control correctly (I
> > think). The problem is when I involk the MCI.command = "Play" method.
> > Nothing happens (although the appropriate amount of time passes indicating
> > it is trying to play). If I hit the rewind followed by the play buttons, it
> > works OK. What I want is full programtical control. In otherwords, I wany to
> > force it to play without user intervention. Any ideas anybody?

> > Rick

Here's an example of how it works (or fails to work:-) -

Somewhere at the beginning of your Form_Load procedure on your startup
form add the following code to initialize the MMControl.  In this
example 'MMControl1' is the name of the multimedia control you will
have placed on your form. (it's the icon that has the music note and
the C: on it):

' Set properties needed by MCI to open.
    MMControl1.Notify = False
    MMControl1.Wait = False
    MMControl1.Shareable = False
    MMControl1.Visible = False
' End of properties for MCI device

Now later in your Form_Load (or anywhere else you want to play a WAV
file) put the following code:

    MMControl1.Command = "Close" ' Make sure closed from last
sound/midi played
    MMControl1.DeviceType = "WaveAudio"
    MMControl1.FileName = "C:\WHEREVER\WHATEVER.WAV"
    Me.MMControl1.Visible = True ' use this line only if you are
hiding the control panel until it's in use
    Me.MMControl1.Command = "Open"
    Me.MMControl1.Command = "Play"

Hope this helps!

--
24 hours in a day, 24 beers in a case... coincidence? I think not.

Paul Doherty CNA/CNE/MCP+I/MCSE
http://www.dfw.net/~pdoherty
Home of PC DiskMaster File/Dir Manager for Win95/98/NT4



Sun, 24 Dec 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Trouble saving a wav file using MCI Multimedia Control

2. Trouble saving a wav file using MCI Multimedia Control

3. MCI control to loop wav file

4. Q: using MCI control to play .wav file in a command button

5. MCI Control with varying Wav Files

6. MCI Control to loop wav file

7. MCI Control: Recording and deleting wav file

8. Recording wav file with MMControl (MCI)

9. Help Saving WAV files with MCI Multimedia

10. Help: WAV file termination indicator MCI

11. MCI and playing *.wav files?

12. Playing WAV files with MCI.MMControl

 

 
Powered by phpBB® Forum Software