Page 1 of 1

What colors does NB use for AlertBox?

PostPosted: Mon Mar 26, 2012 9:34 pm
by Enigman
In the fill color selector, on the Windows tab, there are named colors like "Menu", "MenuText", "Btnface", etc. Does anyone know what colors are being used for the background and text of the AlertBox and message boxes?

I would like to emulate those choices on my custom dialogs so the when a user is running my app with a less common Windows theme, my dialogs are consistent with others.


PostPosted: Tue Mar 27, 2012 5:38 am
by Gaev

I use a ColorPicker program whenever I need to find a color on my screen.

You can download it from

PostPosted: Tue Mar 27, 2012 6:31 am
by Tony Kroos
I think he would like to know a "system name" of the color, if any.
System named colors are differ in different systems/themes,
so any form element would look like the others in any system if you define it's color as "system named" instead of hard-coded #hex/rgb values.
Imho, that's the goal he wants to achieve...

PostPosted: Tue Mar 27, 2012 8:21 am
by Enigman
I think he would like to know a "system name" of the color, if any.

Tony is correct in this case. I don't need to choose a color as in choosing the RGB values, I need to know which "named" system theme colors are being used so I can set my custom dialog components to those names. That way when someone changes Windows themes, my color will be consistent to the new theme. I need a name like "Dialog Background" rather than fixed color names like "Black" or "Red".

So far, trying all the named system theme colors listed, I don't see a match. The closest I have gotten is using "Menu" for the dialog background and "MenuText" for the text. With those my dialogs change with a theme change, but they match the main menu colors and not the AlertBox dialog colors.

I may need official word from NB on this. It doesn't appear that NB has provided the alertbox color names on the list.

PostPosted: Tue Mar 27, 2012 9:09 am
by dec
Hi Enigman,

If you like, take a look at the Colors sample of my npInfo plugin, which provide dozens of system colors based on their names. I think the dialog boxes have a "BtnFace" or may "Color3DFace", but I'am not very sure. Maybe you can get more info on Internet (Microsoft provided) searching for "system color names" or something like that. The npInfo help provide some description about their supported colors too.

Take a look:

PostPosted: Tue Mar 27, 2012 9:22 am
by Enigman
Hi dec,

Unfortunately, NB does not provide a way I know of to select a system name that does not already occur in the NB color list. I have tried "Btnface" and "Btntext' and that is not the same as the alertbox background unless it is accidentally in a given theme. The test is to change themes and see what happens. So far I have not seen a name on the NB list that produces the alertbox background every time.


PostPosted: Tue Mar 27, 2012 9:24 am
by dec

Are you tried the refered sample?

PostPosted: Tue Mar 27, 2012 10:18 am
by Enigman

No, I didn't only because I choose NOT to use any third party plug-in for the app I am developing, so even if the named system color is provided there, I cannot use it. I am looking for an answer using the native functionality of NB.

The app is a high level encryption program for plain text, messages, & RTFs with encrypted text output and radio transmittable output in many styles including NATO phonetic, binary and morse code. It didn't require C++ to do it, so, since I love working with NB I am developing there, not to mention that it started there as a "just for my own use" program. Now it will be commercial, but still only needs NB, and in fact, NB makes it easy to make a single EXE that doesn't need installation which was a target of the design.

For security reasons I cannot rely on the availability of third party add-ons and I do not wish to introduce unknown code into the compiled app. Given the nature of the algorithms necessary to do this, one tiny future change in a third party plug-in could drastically affect the functionality of the app. Therefore, I must create all functional code using native NB.

It's nothing against plug-ins per se. I use them elsewhere. But I cannot use them in the current app. If the app becomes used by more than a handful of people, then it may fall under government scrutiny and need to be certified in some way since I am not using any previously known encryption scheme. The feds do not like any encryption found to be unbreakable, so if it flies as a commercial app, I may have to "certify the algorithms" (that translates to giving them the back door keys). If that happens, believe me ... you do not want to be a third party provider for the app since the certification process would flow through to you as well.

Someone in another thread here said something I thought was very true and quite amusing. It was something like:

"The amount of time it takes for the heavily armed men in black suits to show up at your door is inversely proportional to the amount of time they spend trying to crack your encryption."

Funny, and so true. I am developing an app in a paranoid arena, but I am used to dealing in that arena. I don't wish to drag anyone else in there with me. :wink:


PostPosted: Tue Mar 27, 2012 10:42 am
by Neosoft Support
For the Alert and Message boxes, the background color is BtnFace and the text color is BtnText. As far as I know these are the colors Windows uses for it's own dialog boxes, but other applications can choose whatever colors they like.

PostPosted: Tue Mar 27, 2012 8:29 pm
by Enigman
It took a bit of messing around, but I was able to verify that. Unfortunately it's nearly impossible to verify under Windows 7. I had to reset all the custom dialogs to BtnFace and Btntext, then port the compiled EXE over to a Windows XP system where there are actually different colors for window parts. Under Win 7 all themes seem to use the same window colors. Only the outer frame seems to change from theme to theme, except for the old style high contrast themes and they don't behave with any kind of sense.

Anyway, thanks for the pointer. That was what I needed.