Set persistent custom colors in Windows color picker - windows

Is there a way to have a custom color that has been set in the Windows color picker to be persistent? When I use Adobe LiveCycle and want to change a color to a color that I use all the time, I have to create it every time, and I figured since it's accessing the default Windows color picker, there might be a way to add the color and make it persistent.

IMHO, there is no way of doing so. Microsoft allows to redefine the default colors and it also allows for a hook to remember the user selected colors, but it has to happen in the source of the program. See http://msdn.microsoft.com/en-us/library/windows/desktop/ms646375%28v=vs.85%29.aspx#custom_template on how to set default colors when compiling a program.
Even the Microsoft default Paint program is dumb enough to forget any user defined colors.
Cheers,
p.s. For others, who are programming their own application and what to allow for saving user-defined colors: http://vbcity.com/forums/t/112635.aspx

Related

How to retrieve VS syntax colours

I am building a more advanced editor for VS 2017 / 2019. However, one of the things which is important is to maintain the same colours as defined by the user / theme the user has chosen.
Now, for all the environment colours (that is, all aspects of VS which are not the contents of the editor window), these are easily obtained via the method
VSColorTheme.GetThemedColor(themeResourceKey);
Using the predefined themeResourceKeys as defined in
Microsoft.VisualStudio.PlatformUI.EnvironmentColors
So, for example, to retrieve the background color key for the tool window background, you call the following
VSColorTheme.GetThemedColor(EnvironmentColors.ToolWindowBackgroundColorKey);
What I am after is the keys of the colors being used by VS to color class names, comments, line number, privates, publics, statics, etc, all colors used in the editor. With these color keys, I'd like to then use these code keys to call a VS extensibility class or method to retrieve the actual colours being used.
Does anyone have any knowledge on how the editor is retrieving these actual color keys, and how I can use these to retrieve the currently set color?
Thanks

What system color to use to highlight required fields in delphi/windows

a bit background
I am currently using the clHighlight color together with a StyleServices.GetSystemColor call to set the background color of controls that are:
not focused
have a NULL value (field.IsNull=True)
and are about a required field (field.required=True)
Its not about how to do the highlighting itself, I figured that out already.
Currently I am using system color clHighlight, but this makes confuses my users as they think the entire contents of the field is selected (see screenshot).
But I also have style support implemented, so using a custom predefined color is not really what I am looking for. after googling a bit I found quite a list here https://learn.microsoft.com/en-us/dotnet/api/system.windows.systemcolors?view=netframework-4.7.2 but I am unable to find what I am looking for.
Using RAD studio Rio 10.3.1 Enterprise.
The actual question
So - what system color should I use? (not really looking for subjective suggestions, but for a more or less "officially recommended" constant to use.)
a screenshot
Answer: There is no more or less system color constant defined for this specific purpose.
Solution/workaround:
Thanks all for the suggestions. I decided to go for the clInfoBk constant (background color for hint windows), this looks far less confusing. One could interpret the color as a "hint" for fields that need to be filled out.
And it looks like this, in the default color scheme:

How to alter colors in mac/cocoa text views

Is there a way to alter the standard background and text colors in cocoa text views throughout the mac os? Since the same text system is used by textedit, mail and other programs, I imagine there is an underlying preference that could be altered. Any ideas how to access it?
Just to be clear, I don't mean simply to alter the document colors. This shouldn't be setting a background color or text color as document formatting. I'm just wondering about how I could make all of these text views use different defaults when displaying documents (e.g. white on blue, rather than black on white).
Thanks!
There is no supported way to do this but you might achieve it with a custom Application Enhancer module. Note, however, this is a very controversial subject as poorly-written APE modules (or bugs in Application Enhancer itself) can cause a whole lot of pain in very unusual places (and blame is often placed on the wrong developer as a result).

How to programmatically create a 'bright' and a 'gray' version of an icon?

In a win32 application, I want to have a button with an icon which looks gray when the button is disabled and 'brighter' when the mouse hovers.
I know I can create three bitmaps with an icon editor, but since the icon can be user selected and loaded from the disk, I would like to create the other two versions programmatically.
So, starting with a handle to an image, I would like to:
- Create a new image with all colors converted to grey.
- Create a new image with all colors shifted to white or yellow.
Can this be done using win32 api calls?
Examples in any language will be appreciated.
Maybe the good old DrawState function will suffice. (For some reason it is now listed as only available from Win2000 which is not true.)
And maybe not, in which case you might want to use SetColorAdjustment function.
If the icon is user-selected do you control the format? If not you'll probably want to incorporate an image library or external process like DevIL or Imagemagick which handle more formats than Microsofts API's are likely to..

Guidelines for application colors (background, buttons, etc.) on Windows?

What are the recommended colors for an application's background, button faces, etc.?
In the past I've just chosen a color scheme but I'd like to be more compatible with the Windows Accessibility Options, etc.
I see that VB6 has System Colors like Application Workspace.
Edit: I'd like to find an explanation of all of those colors (like what's the difference between Application Workspace and Window Background?
In my opinion, you should leave the colors as they are if you are using standard controls; they'll get the right color according to che current color scheme by themselves. You need to use the color constants only if you have to draw your own UI elements; in that case, the meaning of those constants is explained briefly in their documentation.
This PDF http://www.johnsmiley.com/cis18/Smiley009.pdf [ explanation of VB6 System Color values ]should help you. It lists all the system color constants and what they mean. For instance vbApplicationWorkspace is the "Background color of multipledocument interface (MDI) applications."
If you're interested in the whole MS Windows UI/UX guidelines, they are available online here and for download here. Page 618 deals with how to "Use theme or system Colors"
It depends on the language and framework you use. .Net for example has an entire SystemColors class full of static properties like SystemColors.Control that are 'changed' to the corresponding system color in runtime.
I think most office applications conform to the system colors, while most graphics intensive applications (e.g. games) use their own color scheme.
It is best if you try to use the colors of the current system (like the .NET SystemColors), that way if the user changes his settings (for example if he uses a high-contrast color scheme or some fancy black theme he likes) your application will adapt those colors and that way conforms to the users preferences/needs.

Resources