如何知道 wpf 应用程序是否在终端服务会话中? [英] How to know if wpf app is in terminal services session?

查看:27
本文介绍了如何知道 wpf 应用程序是否在终端服务会话中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有等价于

SystemInformation.TerminalServerSession 在 wpf 中?

我想知道当前的 wpf 应用程序是否正在终端服务器会话中运行.谢谢

I want to know if the current wpf application is running in a terminal server session. Thanks

推荐答案

您可以使用 SystemParameters 类来查询系统设置,尤其是 SystemParameters.IsRemoteSession 属性以获取指示调用进程是否与终端服务客户端会话相关联的值(如 SystemInformation.TerminalServerSession 属性).

You could use the SystemParameters class to query system settings, especially the SystemParameters.IsRemoteSession property to get a value that indicates whether the calling process is associated with a Terminal Services client session (like SystemInformation.TerminalServerSession property).

这篇关于如何知道 wpf 应用程序是否在终端服务会话中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆