It's 2:30 and I'm desperate!
I'm using the Windows Media Control (wmp.dll) to play music files from a VB6 app. Having never used this contol it took some doing to figure how it worked but I eventually got it working with this simple code (WMPP is the name of a Windows Media Player control on the form--FullName$ is a valid mp3 file).
Dim Plyr As WindowsMediaPlayer
Set Plyr = Me.WMPP.object
Plyr.URL = FullName$
Plyr.Controls.play
MsgBox "playing?"
Plyr.Controls.Stop
After everything was working I removed what I thought were unnecessary "Windows Media Player" references from the project.
I THOUGHT (it is currently 2:30 am though so thought may not be too clear) that what made it work was adding a reference to wmp.dll AND adding the control that is the wpm.ocx. Now, however, I can't get wpm.ocx to load at all and no matter what combination of "Windows Media Player" references I use I get a Type Mismatch error on the 2nd line of code above.
wpm.ocx does NOT show up in my components list and when I browse to it I can an error that says it "was not registerable as an ActiveX component."
What the heck could I have done here?!?! The dang thing worked not an hour ago!
Any help is greatly, greatly appreciated.
Ken
I'm using the Windows Media Control (wmp.dll) to play music files from a VB6 app. Having never used this contol it took some doing to figure how it worked but I eventually got it working with this simple code (WMPP is the name of a Windows Media Player control on the form--FullName$ is a valid mp3 file).
Dim Plyr As WindowsMediaPlayer
Set Plyr = Me.WMPP.object
Plyr.URL = FullName$
Plyr.Controls.play
MsgBox "playing?"
Plyr.Controls.Stop
After everything was working I removed what I thought were unnecessary "Windows Media Player" references from the project.
I THOUGHT (it is currently 2:30 am though so thought may not be too clear) that what made it work was adding a reference to wmp.dll AND adding the control that is the wpm.ocx. Now, however, I can't get wpm.ocx to load at all and no matter what combination of "Windows Media Player" references I use I get a Type Mismatch error on the 2nd line of code above.
wpm.ocx does NOT show up in my components list and when I browse to it I can an error that says it "was not registerable as an ActiveX component."
What the heck could I have done here?!?! The dang thing worked not an hour ago!
Any help is greatly, greatly appreciated.
Ken