有没有等价于
wpf中的SystemInformation.TerminalServerSession ?
我想知道当前的 wpf 应用程序是否正在终端服务器会话中运行。谢谢
有没有等价于
wpf中的SystemInformation.TerminalServerSession ?
我想知道当前的 wpf 应用程序是否正在终端服务器会话中运行。谢谢
您可以使用 SystemParameters 类来查询系统设置,尤其是SystemParameters.IsRemoteSession属性,以获取指示调用进程是否与终端服务客户端会话相关联的值(如 SystemInformation.TerminalServerSession 属性)。
只需添加对 System.Windows.Forms 的引用由于您没有弄乱 UI,因此您不需要任何特殊的东西。
System.Diagnostics.Debug.WriteLine(System.Windows.Forms.SystemInformation.TerminalServerSession.ToString());