How do I discover the image-quality settings of a Remote Desktop session?
I am using DevExpress skins. I implemented a switch to disable skins manually. I need this basically because of a Terminal server (I need to have a flat look to save on connection bandwith).
Anyway, the manual switch isn't good because the user must continously use it when using the application locally or remotely. Of course only a user who cares about look.
I would like to leave the manual switch but to add also another automatic switch that checks the Windows settings for performance (I don't know how to tell this in English, anyway, I mean that setting for performance that lets any version of Windows look, like Windows '98). I would like (if it is possible) to have a unique function that works on every Windows version (2K, XP, Vista, 7, and the server counterparts).
Please note I am not interested in merely knowing whether my system is running in RDP, but whether the performance settings are set for high image quality or not.
You can use my JwaWinsta unit which is in the Delphi Jedi Apilib.
More specifically you can use WinStationQueryInformationW with the WinStationClient info class which returns a WINSTATIONCLIENT structure.
In this structure is the WinStationClientFlags member which is a bitfield that can contain any mask of the following constant:
TS_PERF_DISABLE_NOTHING = $0; TS_PERF_DISABLE_WALLPAPER = $1; TS_PERF_DISABLE_FULLWINDOWDRAG = $2; TS_PERF_DISABLE_MENUANIMATIONS = $4; TS_PERF_DISABLE_THEMING = $8; TS_PERF_ENABLE_ENHANCED_GRAPHICS = $10; TS_PERF_DISABLE_CURSOR_SHADOW = $20; TS_PERF_DISABLE_CURSORSETTINGS = $40; TS_PERF_ENABLE_FONT_SMOOTHING= $80; TS_PERF_ENABLE_DESKTOP_COMPOSITION = $100; TS_PERF_DEFAULT_NONPERFCLIENT_SETTING = $40000000; TS_PERF_RESERVED1 = $80000000;
Further more this structure also returns the ColorDepth member.