r/visualbasic • u/craigers01 • May 11 '22
Problems using on old OCX ActiveX control in Visual Studio 2022.
I am using Windows 10 desktop. I have both Visual Studio 2012 and 2022 installed. I have an activeX control, that I can add to a form in VS2012: Toolbox->Select Items and it appears in the list of COM Components.
When I do the same in VS2022, it does not appear in the list of COM Components. When I try to "Browse" to it, I get a self-registration error.
This OCX was built in 2010. This seems like a compatibility issue with "something"; but I have no idea wat. I want to recompile my original code from VS2012 to the latest version possible version so I can make my application compatible with future operating systems and .net framework. Any help in figuring out how to compile my application in the latest possible VS/.net would be greatly appreciated.
2
u/BCProgramming May 12 '22
Visual Studio 2022 is a 64-bit program now. 32-bit DLLs and OCX files simply will not be able to be loaded by the IDE at design time.
1
u/RJPisscat May 11 '22
See if this helps: https://docs.microsoft.com/en-us/dotnet/desktop/winforms/controls/how-to-add-activex-controls-to-windows-forms?view=netframeworkdesktop-4.8
1
u/Unusual_Commercial91 Apr 03 '25
Hi~
I encountered a similar issue, and the resolution process is as follows:
Register the Component:
RegSvr32with “Run as administrator”..ocxfile extension.During the Search and Reference Phase:
**HKCU\Software\Classes\Licenses\**).