Oriane
8/26/2008 2:30:00 PM
Hi there,
I have problems creating the Windows Media player ActiveX using this C# code
in a Windows Form project:
Type objType = Type.GetTypeFromProgID("AxWMPLib,
AxWindowsMediaPlayer");
oStibil = Activator.CreateInstance(obj);
Of course, I didn't reference the COM component in my .Net project, as I
want to achieve late binding. The objType is null.
Now this WMP ActiveX is installed (I have even tried on two different
machines), and when I use this very same code with another ActiveX class
name, it works. The class name is correct (I can see it if I add a reference
to this WMP COM component in .Net).
Now if the ActiveX is a "in process" ActiveX (a dll or ocx, like the WMP
one) I can't see where it is on my app (I mean on my Windows form). The
final goal would be for me to set the location of the ActiveX, but I can't
see how...
Can I add it to a Control ? To a Container ? Is there a X/Y property I can
set ?
Best regards