Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get a color name from any RGB combination?
"GS" wrote in message
Thanks for providing more detail! Your project sounds like it was worth the effort you put into it for its intended purpose. I feel, though, that this goes far beyond Charlotte's request and so is why I trimmed out 'the fluff'!<g Yeah I got carried away with the 'proper' way to do it when the simple way is probably good enough. Nothing wrong with that, my friend! Happens to me more often than not, and so usually concludes with much code housekeeping. I was initially thinking to put together a 'quick-n-dirty' solution before you posted here. After reading your comments I decided that this, like every other project worth doing, is worth doing well. Problem arose when I couldn't find my listbox dataform sample and so had to start from scratch. The data context isn't as important as the structure that manages the data, which I already had in place at one time. Seems I discarded it in favour of using a listview or my Spread.ocx component I got from Farpoint (back when Farpoint was!) 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! Not sure if you tried the example I posted but if you find any differences in matches with the JavaScript demo it's because it matches against about 100 additional colours not in the list I referred to. Haven't used the API yet, nor your example. It's pretty clear what it does and how it works, though, just reading it through. I plan to make a wrapper that simply returns the info (or custom Err.Description). -- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? 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. Regards, Peter T |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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! 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!! -- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? Not sure about that because I expect the DLL needs to be x64. I don't have MSO x64 installed and so can't say. Perhaps you can ask Rob Bovey about this. Also, Olaf Schmidt provided the reg-free stuff for VBA and so you can ask him about MSO x64 in the classic VB forums. Note that this would be 'OT'! 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. Yes, I've seen that project but not tried it. I don't see how a treeview can also be used as a listview (or am I misunderstanding you), but I can do similar as both with my Spread.ocx. Again, though, it needs to be registered and so is not an option for VBA projects that need to be reg-free. (My apps are 100% portable and so MUST be reg-free) Otherwise, I have no issue installing/registering mscomctl.ocx. (I do plan to investigate using the newer DLL reg-free, though!) -- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get a color name from any RGB combination?
"GS" wrote in message
snip 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? Not sure about that because I expect the DLL needs to be x64. I don't have MSO x64 installed and so can't say. Perhaps you can ask Rob Bovey about this. But can't compile a dll as 64bit, 32bit only. It's not Win64 that's the problem but Office64. Also, Olaf Schmidt provided the reg-free stuff for VBA and so you can ask him about MSO x64 in the classic VB forums. Note that this would be 'OT'! Well not OT over there I assume! But I guess this is getting OT here already. 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. snip 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. Yes, I've seen that project but not tried it. Perhaps you might find the demo file that acts as an extended 'Project Explorer' handy! I don't see how a treeview can also be used as a listview (or am I misunderstanding you), but I can do similar as both with my Spread.ocx. If the listview only contains a single column it has the same appearance and in effect functionality as a treeview that has multiple root nodes but no branches. Only reason to use a listview in such a case is for it's capability to add icons to items, as can do with a treeview. Regards, Peter T |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get a color name from any RGB combination?
"GS" wrote in message
snip 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? Not sure about that because I expect the DLL needs to be x64. I don't have MSO x64 installed and so can't say. Perhaps you can ask Rob Bovey about this. But can't compile a dll as 64bit, 32bit only. It's not Win64 that's the problem but Office64. MSOx64 uses VBA7 for both 32/64 bit versions. This is not an issue! MSOx64 needs x64 DLLs AFAIK! That excludes using VB6 DLLs all together!! Also, Olaf Schmidt provided the reg-free stuff for VBA and so you can ask him about MSO x64 in the classic VB forums. Note that this would be 'OT'! Well not OT over there I assume! But I guess this is getting OT here already. Absolutely! 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. snip 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. Yes, I've seen that project but not tried it. Perhaps you might find the demo file that acts as an extended 'Project Explorer' handy! I don't see how a treeview can also be used as a listview (or am I misunderstanding you), but I can do similar as both with my Spread.ocx. If the listview only contains a single column it has the same appearance and in effect functionality as a treeview that has multiple root nodes but no branches. Only reason to use a listview in such a case is for it's capability to add icons to items, as can do with a treeview. Ah! So it's the other way around; using listview as a treeview! I don't think the icon factor makes this worth the trouble for displaying data in a VBA userform. Please have a look at my listbox-based example when I'm done with it. Though Charlotte's usage only includes 4 fields of data, it can handle as many fields as a listbox max ColumnCount. This should be more than ample for a database solution that's flat-table text file based, and uses standard VB file I/O functions. IMO, that's as simple as it gets for working with smaller amounts of data. If it does grow large it can be easily 'dumped' into a SQLite db file and worked with via ADODB. -- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
custom color for font color and or background shading color | Excel Programming | |||
combination | Excel Discussion (Misc queries) | |||
Combination | Charts and Charting in Excel | |||
combination | Excel Programming | |||
combination | Excel Programming |