locked
ActiveX Control RRS feed

  • Question

  • How can I create 64bit user control/COM control in c# also how can I add 64bit ActiveX control to Windows Form ?
    Tuesday, December 7, 2010 4:11 AM

Answers

  •  

    ActiveX controls or COM components written in .NET languages cannot be referenced by .NET applications in the

    form of interop assemblies. If you "add reference" to such a TLB, or drag & drop such an ActiveX control to your .NET application, you will get an error "The ActiveX type library 'XXXXX.tlb' was exported from a .NET assembly and cannot be added as a reference.". The correct approach is to add a reference to the .NET assembly directly.


    Sincerely,
    Eric
    MSDN Subscriber Support in Forum
    If you have any feedback of our support, please contact msdnmg@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by eryang Monday, December 13, 2010 4:47 AM
    Tuesday, December 7, 2010 9:50 AM

All replies

  •  

    ActiveX controls or COM components written in .NET languages cannot be referenced by .NET applications in the

    form of interop assemblies. If you "add reference" to such a TLB, or drag & drop such an ActiveX control to your .NET application, you will get an error "The ActiveX type library 'XXXXX.tlb' was exported from a .NET assembly and cannot be added as a reference.". The correct approach is to add a reference to the .NET assembly directly.


    Sincerely,
    Eric
    MSDN Subscriber Support in Forum
    If you have any feedback of our support, please contact msdnmg@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by eryang Monday, December 13, 2010 4:47 AM
    Tuesday, December 7, 2010 9:50 AM
  • HI ,

    Thanks for your reply & guidance. I have another issue regarding COM component which I have published in different forums including MICROSOFT developer  forum (In all possible departments) also.But I didn't get any solution yet.

     

    I have made a user control using c#.net and made the control as COM interop along with COM visible true. It built & registered  by "regasm" successfully. My control is visible in power point 2010 under "More Controls" option and can able to add it in slide. The problem is after embedding the control in slide (in design time) a big red color "X" sign displays inside the control (and rest background is white) instead of the actual visual appearance of User Control. but when i start slide show, the User Control displays its own interface (GUI) and when i stop slide show again the interface disappear & display red "X" sign.  This User Control works fine with previous versions of MS Power Point (2007/2003/XP). This BIG RED "X" problem is happening with MS Power Point 2010. How do I correct this problem??

    Office Version: Office 2010
    Program:PowerPoint
    Operating System:Windows XP
    Visual Studio : 2008
    Working Framework : 3.5

    Using Language : C#

     

    Regards

    Nibir Mistry

    Friday, December 17, 2010 9:51 AM
  • Hello,

    I might be wrong about the way I'm following for implementing & fixing my "RED X" issue, I got some samples "All-In-One Code Framework (COM)" for "CSActiveX " from ( http://1code.codeplex.com ). But the same problem persists with their sample code. I think there might another way for fixing this "RED X" issue.

    Thanks

    Nibir Mistry
    Friday, February 18, 2011 7:00 AM