N
nano2k
Hi.
I have a page that is hosted by a WebBrowser control that is "hosted"
by a WinForms.
The page displays an ActiveX control.
I need, from C# code to access and manipulate the ActiveX control. I
already managed to get a reference to the HTMLObjectElementClass
object, but I need to somehow get the right reference to the ActiveX
object itself so that I will be able to invoke directly it's methods,
like:
myActiveX.Load();
To be more specific. Let's say we have this HTML page:
<html><BODY><table><tr><td> <object classid=clsid:
464623dc-4d81-11dc-8314-0800200c9a66 id='myControl' width='660',
height='500' > <PARAM NAME='Host' VALUE='192.168.3.100'/> <PARAM
NAME='HttpPort' VALUE='80'/> <PARAM NAME='RTSPPort' VALUE='554'/>
<PARAM NAME='RTSPoverHTTP' VALUE='0'/> <PARAM NAME='RTSPoverTCP'
VALUE='0'/> <PARAM NAME='VFormat' VALUE='96'/> <PARAM
body></html>
I get a reference to the hmtl element like this:
HTMLDocumentClass doc = webBrowser1.Document.DomDocument as
mshtml.HTMLDocumentClass;HTMLObjectElementClass myControl =
doc.all.item("myControl", 0) as HTMLObjectElementClass;
From myControl I need to get a reference to the underlying COM object
with the appropriate type so that I can call methods like this:
myControlCOM.Load();
Thanks.
I have a page that is hosted by a WebBrowser control that is "hosted"
by a WinForms.
The page displays an ActiveX control.
I need, from C# code to access and manipulate the ActiveX control. I
already managed to get a reference to the HTMLObjectElementClass
object, but I need to somehow get the right reference to the ActiveX
object itself so that I will be able to invoke directly it's methods,
like:
myActiveX.Load();
To be more specific. Let's say we have this HTML page:
<html><BODY><table><tr><td> <object classid=clsid:
464623dc-4d81-11dc-8314-0800200c9a66 id='myControl' width='660',
height='500' > <PARAM NAME='Host' VALUE='192.168.3.100'/> <PARAM
NAME='HttpPort' VALUE='80'/> <PARAM NAME='RTSPPort' VALUE='554'/>
<PARAM NAME='RTSPoverHTTP' VALUE='0'/> <PARAM NAME='RTSPoverTCP'
VALUE='0'/> <PARAM NAME='VFormat' VALUE='96'/> <PARAM
NAME='MediaPassword' VALUE='zozo'/> </object></td></tr></table></NAME='G72640PT' VALUE='98'/> said:<PARAM NAME='AMRPT' VALUE='101'/> <PARAM NAME='UIMode' VALUE='0'/
<PARAM NAME='MediaUsername' VALUE='zozo'/> <PARAM
body></html>
I get a reference to the hmtl element like this:
HTMLDocumentClass doc = webBrowser1.Document.DomDocument as
mshtml.HTMLDocumentClass;HTMLObjectElementClass myControl =
doc.all.item("myControl", 0) as HTMLObjectElementClass;
From myControl I need to get a reference to the underlying COM object
with the appropriate type so that I can call methods like this:
myControlCOM.Load();
Thanks.