Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6152471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:55:35+00:00 2026-05-23T19:55:35+00:00

I have created .Net usercontrol in C#. it is graphical control with a text

  • 0

I have created .Net usercontrol in C#. it is graphical control with a text box and listbox.
Now I want to use this control in legacy VC++ application.(native binary).
means I want to call manage code from unmanage code.

suppose my usercontrol name is xyz.dll.
I generated tlb file using tlbexp.exe and then i registered this control using below command line.
regasm xyz.dll /tlb:”C:\xyz.tlb” /codebase

I have checked my control using ‘Activex control test container’ (open studio 2005 and go to ‘tools’ menu)
I tested my .Net usercontrol on this tool and it worked fine.

then I created a sample C# window application. Under Toolbox, I right click and selected ‘Choose Items’ and selected
“COM component” tab. and choose my xyz.dll control.
now this contol is added into toolbox.

But when I drag this control onto window then i got below error.
Failed to create component ‘AxHost’. The error message follows:

‘System.Runtime.InteropServices.COMException (0x80029C4A): Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY))
at System.Windows.Forms.Design.DocumentDesigner.AxToolboxItem.CreateComponentsCore(IDesignerHost host)
at System.Drawing.Design.ToolboxItem.CreateComponentsCore(IDesignerHost host, IDictionary defaultValues)
at System.Drawing.Design.ToolboxItem.CreateComponents(IDesignerHost host, IDictionary defaultValues)
at System.Windows.Forms.Design.OleDragDropHandler.CreateTool(ToolboxItem tool, Control parent, Int32 x, Int32 y, Int32 width, Int32 height, Boolean hasLocation, Boolean hasSize, ToolboxSnapDragDropEventArgs e)’
.

also give me some pointer “how to use .net usercontrol into legacy C# application”

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T19:55:36+00:00Added an answer on May 23, 2026 at 7:55 pm

    There is not enough information but my guess so far:

    The Control is developed in .NET 4 and the legacy C# application is in .NET 2.
    .NET 4 can mix .NET-version in the same process, but .NET 2 can’t so I suspect to solve this you need to develop/build the control in .NET 2 so that it is usable in .NET 2 & 4.

    EDIT (after the comment about .NET 3.5):

    You need to register the control by running regsvr32.

    EDIT 2:
    regsvr32 xyz.dll OR regsvr32 /i xyz.dll

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created my first asp.net UserControl that I will use in several places
I have created ASP.net Web application which uses Crystal Report to show reports. Now
I have created a .net application that is currently using a encrypted text file
I have created a VB.Net lending application for a cooperative that caters to widows.
I have created a simple Asp.Net custom control which automatically combines all the correct
I have created a Web Application in asp.net 2.0. which is working fine on
We have created a web application, using ASP.NET, that allows users to upload documents
In a Visual Studio website, I have created a user control. This control is
I have created an ASP.NET class. In that class i would like to use
I have created a WPF UserControl called ChartPanel to my .NET 4.0. I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.