Problem with gradient background using remote desktop

Author: (Darryl Ley)

I am looking for ideas regarding a color issue when deploying on Windows Terminal Server. In an effort to 'freshen up' our application I have added a gradient to the background of a form. When the application is run directly on a client machine or run directly on the console of the Terminal Server the gradient looks good. When the application is run via a remote desktop session the gradient is no longer smooth and shows horizontal 'bands'.

The Terminal Server display settings and the RDP session are both set for 32 bit color. I have tried setting the gradient as the background in the component's 'Window Properties', displaying it as a 'picture' widget, setting the scale to default and automatic, used a glyph and tried referencing the file directly (.jpg, .bmp and .png) and nothing changes the 'banding' behavior via remote desktop.

The interesting thing is if I just open up the very same image I am using for the gradient using 'Windows Picture and Fax Viewer' inside the same remote desktop session it looks good, but when I open the image using 'Paint' I see the same banding that appears in the Uniface application.

Uniface 9.2.01
Windows Terminal Server 2003 R2
Client: Windows XP and Windows 7


  1. Working with terminal server always awful, and colours doesn't match always, even in other applications.

    Two hints, which may help:

    Make the picture same size as it will be shown in the application and avoid auto-scaling.

    Reduce the number of colours of the original pic (there are lots of freeware programmes doing that) from 32-bit to something less (16, 8 bit). The difference is hardly visible, but the results may be better.


    Author: gypsilon (
  2. Early on I changed the RDP-Tcp 'Client Settings' on the Terminal Server to no longer limit the maximum color depth. When I did this it said only new sessions would get the new setting, it turns out that a reboot of the Terminal Server was necessary. Problem solved.

    Author: Darryl Ley (