View Single Post
  #22   Report Post  
Posted to microsoft.public.excel.programming
Peter T[_7_] Peter T[_7_] is offline
external usenet poster
 
Posts: 162
Default Get a color name from any RGB combination?


"GS" wrote in message
Point of it is that neither of those controls can be used after Vista
without installing/registering them, and the latter requires a developer
license. No problem for VB6 apps because I use a manifest and so they
run reg-free. I can do run Excel apps reg-free only for DLLs via
'LoadLibrary', but that doesn't work for OCXs!


AIUI even in XP still had to register but the difference since Vista is
the UAC must be turned off or permission given. Can be done manually, or
via cmd (without turning off the UAC), or with an installer subject to
the user accepting the prompt that appears. I've never looked into
RegFree and manifest, always meant to! However even Regfree won't help
with Office 64bit, right?


Not for OCXs, but DLLs should still be possible so long as 'LoadLibrary'
is available!


There is a ptrSafe version of LoadLibrary. So are you saying with RegFree
you can use a VB6 aX dll in Office 64 and call it from VBA, as a ComAddin
too?

Seems for VBA the only solution for the old favourite ocx's is to roll
your own. You mentioned listview, was thinking about adapting that one
day.

It takes a bit more code to implement, but still requires its library to
be registered. This is why I did my initial listbox-based dataform way
back before UAC days and dropped support for mscomctl.ocx. I see, though,
that similar libs ship as DLLs in recent versions of Windows and so may be
worth re-exploring use of the listview!!


FWIW the mscomctl treeview has been adapted to VBA, can also use that for a
simple listview that's used for the only reason you can include add an icon
to the item.

Regards,
Peter T