4

We have been working on our ActiveX grid control since 2000 and have a lot of happy customers. The control is still supported, but the main problem we and our customers have recently faced is the 64-bit editions of MS Office VBA our grid control is widely used in. The problem is that our OCX is 32-bit as it is developed/compiled in Visual Basic 6 which cannot produce 64-bit code - at least, in its original form.

The question is: Is there a way to recompile our existing VB6 project as a 64-bit ActiveX control? Is it possible to do that from VB6 using say an add-in or modification of VB6 IDE, or are there other tools like command line compilers for that? Maybe, another dev environment like RealBasic which can produce 64-bit code?

Sure we know that the source code (mainly API calls) should be also updated, but in this question we ask about the general possibility to create 64-bit executable OCX from VB6 source code.

Feel free to post any ideas regarding the problem, even after months from the day of publishing.

user207421
  • 305,947
  • 44
  • 307
  • 483
TecMan
  • 2,743
  • 2
  • 30
  • 64

2 Answers2

1

I'm sorry to say that it's simply not possible to create a 64 bit control with VB6.

One workaround might be to create a 64 bit user control in VB.NET and then use interop to host your 32 bit control within it but it's a terrible kludge and not worth the effort.

Robin
  • 171
  • 8
  • I already created an ActiveX wrapper for our WinForms grid using COM Interop. It's really a tedious work as you need to write code to wrap each method, property and event. Add to this that not all data types can be passed "as is" between the COM and .NET world. But your idea is very good as a general concept - never thought about it, thank you. Just one question: can we really use an ActiveX wrapper for our .NET assembly registered with regasm in the 64-bit version of MS Office? – TecMan Sep 19 '13 at 06:55
  • You 'should' be able to. It's not something I've actually tried because frankly it's better to rewrite in VB.NET rather than spend all the time and effort of doing it the long way round. My recommendation would definitely be to rewrite and not wrap. – Robin Sep 23 '13 at 08:15
0

The only hope and possible solution to this problem is the RAD Basic project. Carles Royan running this development is doing his best to provide us with the ability to compile ActiveXs for the 64-bit platform. Perhaps, we will see an alpha release of RAD Basic capable of doing this in the second half of 2021. I'll update this answer when this happens.

TecMan
  • 2,743
  • 2
  • 30
  • 64