Nice... but,
doesn't seem to work with ActiveX controls.
Looking into it I have observed that the designer creates another kind of
wrapper for ActiveX controls, if I create a reference via the toolbox.
The Objectbrowser shows that reference as "axinterop.Name OfTheImportedLi b".
Using the wrapper contained there just works fine for me.
The code looks like this:
....
using AxNameOfTheImpo rtedLib; //The wrappers namespace created by the
designer
....
{
//AxNameOfTheImpo rted is just the wrapper class available in
//namespace AxNameOfTheImpo rtedLib
AxNameOfTheImpo rted myInstance = new AxNameOfTheImpo rted ();
myInstance.Crea teControl(); //Just force the damn thing to be created
;-)
myInstance.DoSu mptin(); //You can now start to use the controls members
...
}
Scarfeet
"Kevin" <cw****@insight .rr.com> schrieb im Newsbeitrag
news:18******** *************** **@posting.goog le.com...
Stefan,
I had to do this very thing yesterday with CreateObject. Here's what
worked for me.
VB
Set xmlReq = CreateObject("M icrosoft.XMLHTT P")
C#
MSXML.XMLHTTPRe quest xmlReq = (MSXML.XMLHTTPR equest)
Activator.Creat eInstance(Type. GetTypeFromProg ID("Microsoft.X MLHTTP"));
seems like a lot more to write out.. but it works like a charm.
Kevin
"Stefan Saur" <an*******@disc ussions.microso ft.com> wrote in message
news:<09******* *************** ******@phx.gbl> ...
Hello,
I have the commands to access the AutoCAD database via
ActiveX within a VB application. Now I am searching for
the equivalent commands in C#:
VB --> C#
GetObject --> ???
CreateObject --> ???
Can you help me?
Thx
Stefan