如何发现远程桌面会话的图像质量设置?
我正在使用 DevExpress 皮肤。我实现了一个手动禁用皮肤的开关。我需要这个基本上是因为终端服务器(我需要有一个扁平的外观以节省连接带宽)。
不管怎样,手动切换并不好,因为用户在本地或远程使用应用程序时必须连续使用它。当然只有关心外观的用户。
我想保留手动开关,但添加另一个自动开关 检查 Windows 设置性能的开关(我不知道如何 用英语告诉我,无论如何,我的意思是性能设置可以让任何人 Windows 版本的外观,如 Windows '98)。我想(如果可能的话) 具有适用于每个 Windows 版本(2K、XP、Vista、7、 和服务器对应项)。
请注意,我不仅仅想知道我的系统是否在 RDP 中运行,还想知道性能设置是否设置为高图像质量。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
你好
您可以使用 WTSEnumerateSessions api 检查用户是否在 rdp 模式下运行。
希望这能回答您的问题。顺便说一句,delphi 没有 WTSEnumerateSessions 的导入,因此您必须手动导入它,或者下载 Jwa 库。该函数在 JwaWtsApi32.pas 中贴标
Hi
You can use WTSEnumerateSessions api to check if the user is running in rdp mode.
Hope this answers your question. BTW delphi doesn't have an import for WTSEnumerateSessions, so you will have to import it by hand, or download a Jwa library. The function is decalred in JwaWtsApi32.pas
使用
SM_REMOTESESSION
系统指标来确定您的程序是否通过 RDP 运行。这篇 OldNewThing 帖子提供了更多信息。
Use the
SM_REMOTESESSION
System Metric to determine if your program is running over RDP.This OldNewThing post has much more information.
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.
此结构中是 WinStationClientFlags 成员,它是一个位字段,可以包含以下常量的任何掩码:
此外,此结构还返回 ColorDepth 成员。
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:
Further more this structure also returns the ColorDepth member.