|
-
Feb 3rd, 2004, 10:02 AM
#1
Thread Starter
New Member
Media Player code- should work but doesn't (?)
If I create a button on a form in VB.Net, add a COM reference to Windows Media player (so it references msdxm.ocx) and then put the code in:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim mp As New MediaPlayer.MediaPlayer
mp.FileName = "c:\d.mp3"
mp.play()
End Sub
I get the following message when the mp.play() line is reached:
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in MP3Test.exe
Additional information: Exception from HRESULT: 0x800A0005 (CTL_E_ILLEGALFUNCTIONCALL).
Any ideas why? BTW d.mp3 does exist in the right place. i've also tried the mp.open("c:\d.mp3") method as well with the same result
ta,
Rob
-
Feb 3rd, 2004, 06:20 PM
#2
yay gay
I think it's some interop problem
\m/  \m/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|