Avlin,
See inline.
Finally, .NET does not support exporting ActiveX controls. COM
objects, yes, but ActiveX controls, no. You can do it with a
workaround, but it is unsupported by MS.
What exactly does this mean? Technically speaking. And what is the
workaround? Currently, I have an open ticket with MS and they can't
figure out how to sink events in Internet Explorer using VS 05 and
ActiveX controls and C# so any tidbit you can give to this two week old
problem will be helpfull.
It means that you can not export ActiveX controls from .NET. If you
search google, you will find a workaround posted out there. However,
Microsoft does not officially support this, so if you find quirks, or
that certain things that don't work, you are out of luck, you won't get
support.
The attribute is in the Microsoft.VisualBasic namespace, located in
Microsoft.VisualBasic.dll. You can use it in C#, but it will do you
no good. The C# compiler will not recognize it.
Ya we already tried the VisualBasic namespace import, but that was just
a waste of paper. Curious to find out why it didn't work as well. Same
code works a treat in VS 03 or VS 05 and Visual Basic. No joy in VS 05
and C#.
In reality, you should be using the Guid attribute to assign the CLSID
to the implementation and the IID to the interface, as well as
defining your interfaces and implementing them on your class (and
using the ProgId attribute as well as the ClassInterface attribute).
That doesn't work. Events are fired in the control but don't sink in IE
with C# and 05
Right, but you aren't supposed to be exporting .NET controls as
ActiveX controls in the first place with IE. If you want to host
controls from .NET in IE, then I would do it the correct way:
http://windowsforms.net/articles/iesourcing.aspx
Of course, this requires that you have a Windows platform, as well as
.NET installed.
Instead of this, I would recommend pushing a smart client out to the
user. You can give them a better experience than a web page, IMO, and
you already fufill the requirements (you know you are on a Windows
platform with the framework installed already).
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]
[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog:
http://www.msmvps.com/blogs/alvin
-------------------------------------------------------
"Nicholas Paldino [.NET/C# MVP]" <
[email protected]>
wrote in message Avlin,
The attribute is in the Microsoft.VisualBasic namespace, located in
Microsoft.VisualBasic.dll. You can use it in C#, but it will do you
no good. The C# compiler will not recognize it.
Also, I doubt that using that in VB is really the proper way to
expose COM objects anyways. In reality, you should be using the Guid
attribute to assign the CLSID to the implementation and the IID to the
interface, as well as defining your interfaces and implementing them
on your class (and using the ProgId attribute as well as the
ClassInterface attribute).
Finally, .NET does not support exporting ActiveX controls. COM
objects, yes, but ActiveX controls, no. You can do it with a
workaround, but it is unsupported by MS.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
"Alvin Bruney [MVP]" <
www.lulu.com/owc> wrote in message
Before I go shooting my mouth I'd like to find out why a new language
like C# does not have the ComClass attribute that is available in
Visual Basic.
For context, the absence of the ComClass attribute in C# makes
writing ActiveX controls extremely messy and error prone.
--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]
[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog:
http://www.msmvps.com/blogs/alvin