Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Doc Trusted Contributor.
Trusted Contributor.
290 views

Initial Back Ground color

Jump to solution

On moving from Server 2008 to server 2016, what controls the initial back ground color when you run an app via wrun32.exe?  On server 2008 and background is a dark gray, on server 2016 it is now a light gray. would like to go back to the dark gray. 

0 Likes
1 Solution

Accepted Solutions
DougP Outstanding Contributor.
Outstanding Contributor.

Re: Initial Back Ground color

Jump to solution

Hi Doc,

 

What you are seeing is due to the fact that ACUCOBOL-GT 16-color palette is the Windows palette and Microsoft changed the default gray.  It is a much lighter color in recent Windows.

There is no simple global way to change that for your whole application, like a configuration setting, or compile option. 

However, you can code your screens for a different color.  If you are using the AcuBench Screen Designer it is actually pretty simple.  Customize one of the standard colors to the exact color you want, then set the screen to use that color.

To start, right-click on the screen and select ‘Change Color Palette…’  Under ‘Custom Colors:’ you will see the 16 default colors. The top row on the right end is color 8 the default gray color that comes out differently on various Windows versions, and the one you get by default if you do not code a specific color.  You cannot modify this color - well you can but Windows always shows the same color regardless of what you set here.

What you can do is select some other color - say yellow (bottom row second from the right) then set Red to 210, Green to 206, and Blue to 199 (you may want to tweak those values to get closer to the old color), click ‘Add to Custom Colors’.  While you’re there set the color right above that one (color 7) to black (0 for Red, Green, and Blue).  You need to do that because when you set the screen to use that yellow color Windows uses the corresponding darker color for 3D effects.  Click ‘OK’ to exit the Color dialog.

Last thing left to do is set your screen color.  In the Screen Designer with the screen selected go to the Color property and click the little button in the Value field.  Change the Backround color to “15:Yellow” (which is now your custom color).

Go ahead and compile and run your program and you’ll see the old gray color (something close to it anyway).  Note that some elements will still have the newer lighter color - push-buttons, scroll bar buttons, combo-box dropdown buttons.  Only the push-button color can be changed - do that by setting the Background color to “15:Yellow” and adding to the Runtime configuration setting “WIN32-NATIVECTLS ON”.  Without turning on native controls the push-button will remain that lighter default color.

If you are manually coding your screens the changes are still minimal.   I’ve attached our Tour.cbl sample program with these changes already done.  Simply compile and run it with a configuration file containing “WIN32-NATIVECTLS ON” to see the effect.  Examine the code for calls to W$PALETTE to change the colors, and note the color settings for the push-button in the screen section, and for the window in the display statement.

View solution in original post

0 Likes
1 Reply
DougP Outstanding Contributor.
Outstanding Contributor.

Re: Initial Back Ground color

Jump to solution

Hi Doc,

 

What you are seeing is due to the fact that ACUCOBOL-GT 16-color palette is the Windows palette and Microsoft changed the default gray.  It is a much lighter color in recent Windows.

There is no simple global way to change that for your whole application, like a configuration setting, or compile option. 

However, you can code your screens for a different color.  If you are using the AcuBench Screen Designer it is actually pretty simple.  Customize one of the standard colors to the exact color you want, then set the screen to use that color.

To start, right-click on the screen and select ‘Change Color Palette…’  Under ‘Custom Colors:’ you will see the 16 default colors. The top row on the right end is color 8 the default gray color that comes out differently on various Windows versions, and the one you get by default if you do not code a specific color.  You cannot modify this color - well you can but Windows always shows the same color regardless of what you set here.

What you can do is select some other color - say yellow (bottom row second from the right) then set Red to 210, Green to 206, and Blue to 199 (you may want to tweak those values to get closer to the old color), click ‘Add to Custom Colors’.  While you’re there set the color right above that one (color 7) to black (0 for Red, Green, and Blue).  You need to do that because when you set the screen to use that yellow color Windows uses the corresponding darker color for 3D effects.  Click ‘OK’ to exit the Color dialog.

Last thing left to do is set your screen color.  In the Screen Designer with the screen selected go to the Color property and click the little button in the Value field.  Change the Backround color to “15:Yellow” (which is now your custom color).

Go ahead and compile and run your program and you’ll see the old gray color (something close to it anyway).  Note that some elements will still have the newer lighter color - push-buttons, scroll bar buttons, combo-box dropdown buttons.  Only the push-button color can be changed - do that by setting the Background color to “15:Yellow” and adding to the Runtime configuration setting “WIN32-NATIVECTLS ON”.  Without turning on native controls the push-button will remain that lighter default color.

If you are manually coding your screens the changes are still minimal.   I’ve attached our Tour.cbl sample program with these changes already done.  Simply compile and run it with a configuration file containing “WIN32-NATIVECTLS ON” to see the effect.  Examine the code for calls to W$PALETTE to change the colors, and note the color settings for the push-button in the screen section, and for the window in the display statement.

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.