Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

'InvalidActiveXstateException' with WMP 9.0

Status
Not open for further replies.

hgrays

MIS
Nov 25, 2002
8
US
I'm using the new version of Windows Media Player 9.0 in a new app. I've downloaded the SDK and registered the PAI and I think I've doen everything I need to do to start the project. I add the WMP component to the toolbox and then add it to my form. The build goes fine. Problem is, everytime I run the form, I get an 'InvalidActiveXStateException' error and it highlights a piece of the pre-built code. Something like...
wmpPlayer.Enabled = True
In looking up the error, it says something like the object can't be enabled until it's instantiated. If I comment out that line, I can run the form and everything appears none the worse for wear. Any ideas what the problem is?
 
Hello,
If you found an answer to this problem, please let me know - I'm having the same problem.
 
Hi,

I am looking for the same help. Did any of u find solution?

I am able to set properties like height, width and name. But when i tried to call the method it is throwing the same exception.

Tina
 
Hello,

I had a similar error with a different ActiveX control. The error seems to be linked to the speed with which ActiveX controls are initiated. It seems that if I first set the properties and leave the method for last, this forces the control to initiate on time.

natuk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top