2

We make a C++ ActiveX control for years now. It's now built using VS 2019.
When I create a new .NET Framework v4.8 WinForms project I can add my ActiveX control to the toolbox in VS2019 and drop it on my form.

But when I create a new .NET 5 WinForms project using VS2019 or a new .NET 6 WinForms project using VS2022 I can look up the ActiveX control when using Choose Items .. but when I select the control I get this error:

The following controls were successfully added to the toolbox but are not enabled in the active designer

Make sure the controls to add are compatible with the current designer and .NET Framework version

I can however create the control using code in the designer and at run-time, the application works as expected. I can't open the form in design time, that will generate an error.

Most likely I need to update my ActiveX control to make it more compatible with .NET Core, but I can't find what.

Can anybody offer advice?

MarredCheese
  • 17,541
  • 8
  • 92
  • 91
Paul Meems
  • 3,002
  • 4
  • 35
  • 66
  • From what I've checked, ActiveX [doesn't inherently support .net core.](https://learn.microsoft.com/zh-cn/dotnet/desktop/winforms/advanced/windows-forms-and-unmanaged-applications-overview?view=netframeworkdesktop-4.8) Maybe you can try to refer to the following [link.](https://stackoverflow.com/a/46866309/16764901) – Jiale Xue - MSFT Feb 17 '22 at 02:29

1 Answers1

3

It seems this is by design. Microsoft decided to not put back the ability to use ActiveX controls in the Forms designer when using .NET.

When you need this, you can vote for it on https://developercommunity.visualstudio.com/t/support-for-activex-controls-in-windows-forms-desi/1435698 and perhaps before the end of the century, it will be implemented.

Paul Meems
  • 3,002
  • 4
  • 35
  • 66
  • Hi Paul Meems, glad to know you've found the solution to resolve this issue! Please consider accepting it as an answer to change its status to Answered. It will also help others to solve a similar issue. See [can I answer my own question..](https://stackoverflow.com/help/self-answer), Just a reminder :) – Jiale Xue - MSFT Feb 21 '22 at 02:24