Author Topic: ListView Control in AutoCAD Electrical 2021  (Read 1855 times)

0 Members and 1 Guest are viewing this topic.

gadf007

  • Mosquito
  • Posts: 2
ListView Control in AutoCAD Electrical 2021
« on: December 26, 2023, 04:32:16 AM »
Hello!

I have a programm that is made with VBA for AutoCAD adn it was made around 20y. ago. The thing is application ListView object from Microsoft Common Controls 6.0 (SP6). That liabrary is added in Reference from"C:\Windows\System32\MSCOMCTL.OCX". I've used CMD with regsrv32 command already. The VBA editor can see this ref. but all controls (ListView, TreeView, ImageView etc.) are missing in "Additional controls" list. How can I fix this problem?
There is no problem with Excel. There I can use ListView and whatere I need. And it also has the same reference

n.yuan

  • Bull Frog
  • Posts: 348
Re: ListView Control in AutoCAD Electrical 2021
« Reply #1 on: December 26, 2023, 11:33:30 AM »
You cannot use these controls in AutoCAD VBA any more if your AutoCAD is 64-bit and VBA is also 64-bit (meaning you are using AutoCAD 2015 or newer). These COM controls are 32-bit. with current 64-bit VBA in AutoCAD, you are limited to use the few VBA built-in controls. If the old VBA program is mission-critical and the UI that uses the COM 32-bit ListView cannot be abandoned, then you probably want to migrate/port/re-write the program in AutoCAD .NET API, which is also facing a rather significant change in the coming version (from .NET framework to .NET 8). It is the time to stop waste time with AutoCAD VBA.

gadf007

  • Mosquito
  • Posts: 2
Re: ListView Control in AutoCAD Electrical 2021
« Reply #2 on: December 26, 2023, 11:39:13 PM »
Thanks for replying!


57gmc

  • Bull Frog
  • Posts: 366
Re: ListView Control in AutoCAD Electrical 2021
« Reply #4 on: January 09, 2024, 10:52:52 AM »
May be possible....

https://www.reddit.com/r/vba/comments/uo7ii1/mscomctl_for_64bit_treeview_listview_progressbar/
If you use 3rd party custom controls, you have to make sure you install them on all user's pc's.

n.yuan

  • Bull Frog
  • Posts: 348
Re: ListView Control in AutoCAD Electrical 2021
« Reply #5 on: January 10, 2024, 12:25:34 AM »
May be possible....

https://www.reddit.com/r/vba/comments/uo7ii1/mscomctl_for_64bit_treeview_listview_progressbar/

Well, the said 64-bit OCX comes with 64-bit MS Office. Many, if not most, computers have 32-bit MS Office, thus that 64-bit OCX would not be available.