Playing MP3 on Form Load

kmann

New member
Joined
Apr 5, 2003
Messages
4
Okay, heres one that I cant seem to find a simple answer to.
How do I play an mp3 file on form load?

I have found the OCX activex tool and added the object to my form and have my mp3 file, but what would the code be to connect the file to the player and to actually play it?

Youd think that since Windows is so multi-media oriented, this would be straight forward, but apparently not.

Any help would be appreciated...:-\
 
We have no way of knowing the answer to your question, as we dont
even know what the OCX is. At any rate, the Microsoft Windows Media
player control will do what you need to do, and it is included in most
new versions of Windows.

It can be found in the compnents list under Media Player or something
similar. If you use it, just set the FileName property to the MP3 name,
and the MP3 should play.
 
OCX is the name of the control that I added from the Customize Tool box option under the Tools Menu. If you go in there, on the "COM" tab, scroll all the way to the bottom, youll see the Windows Media Player. So thats what I added, and it showed up as "OCX" in my tool box. And as far as I can tell, there is no "file name" property.
 
There is a file name, how do you invoke the player to play the file?
I get an error if I use .play().

Anybody done this?
 
Back
Top