AOB
Registered User.
- Local time
- Today, 09:56
- Joined
- Sep 26, 2012
- Messages
- 632
Does anybody know if, when calling the Windows Colour Dialog (to provide an option for a user to select a colour for something) :
Open the Windows Color Dialog from VBA
...is it possible to define, set or change, the Basic Colours that are loaded into that dialog (as opposed to the Custom Colours, which can, as is seen within the code, be very easily pre-defined via an array of Long variables)
That is, the block of 8x6 colours at the top, as opposed to the block of 8x2 colours at the bottom?
I find the standard / stock set fairly useless, as many of them are either incredibly similar (there are 5 different greens that are barely distinguishable to the naked eye), or quite garish / loud. Basically, nobody in their right mind would choose any of them and even fewer are going to be willing/bothered going to the trouble of manually working out the red, green and blue constituents to find something vaguely resembling the colour they actually want.
I'd much prefer to pre-define them to be similar to the "Theme Colours" that you get in Excel when formatting font or interior (i.e. 10 columns of basic colours, graduating from lighter to darker down 6 rows) or the similar colour-picker options in the Design view for a form when you modify any of the colour attributes of a control (e.g. Back Color, Fore Color etc.)
(Obviously 60 into 48 won't go; I'm not looking for an exact reproduction here, this is just an example!! Also, I know I've already stated above, I can always pre-define the custom colours instead, but that only gives me 16 shades to play with, when there are 48 directly above going to waste)
I know Excel has things like
The ChooseColor API is pretty much perfect for my requirements apart from the fact the colours it starts off with are terrible!
Any suggestions?
Open the Windows Color Dialog from VBA
...is it possible to define, set or change, the Basic Colours that are loaded into that dialog (as opposed to the Custom Colours, which can, as is seen within the code, be very easily pre-defined via an array of Long variables)
That is, the block of 8x6 colours at the top, as opposed to the block of 8x2 colours at the bottom?
I find the standard / stock set fairly useless, as many of them are either incredibly similar (there are 5 different greens that are barely distinguishable to the naked eye), or quite garish / loud. Basically, nobody in their right mind would choose any of them and even fewer are going to be willing/bothered going to the trouble of manually working out the red, green and blue constituents to find something vaguely resembling the colour they actually want.
I'd much prefer to pre-define them to be similar to the "Theme Colours" that you get in Excel when formatting font or interior (i.e. 10 columns of basic colours, graduating from lighter to darker down 6 rows) or the similar colour-picker options in the Design view for a form when you modify any of the colour attributes of a control (e.g. Back Color, Fore Color etc.)
(Obviously 60 into 48 won't go; I'm not looking for an exact reproduction here, this is just an example!! Also, I know I've already stated above, I can always pre-define the custom colours instead, but that only gives me 16 shades to play with, when there are 48 directly above going to waste)
I know Excel has things like
Application.Dialogs(xlDialogEditColor)
and Application.Dialogs(xlDialogColorPalette)
etc. but they're not accessible from Access (at least, not without loading up an instance of Excel, which is overkill when all I want is a simple integer representation of a user-selected colour)The ChooseColor API is pretty much perfect for my requirements apart from the fact the colours it starts off with are terrible!
Any suggestions?