我如何知道我的应用程序在一个RDP会话中运行 [英] How do I tell if my application is running in an RDP session

查看:399
本文介绍了我如何知道我的应用程序在一个RDP会话中运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个.NET的WinForms应用程序,它有一些动画效果,淡入和滚动动画等,这些做工精细但是如果我在一个远程桌面协议会话的动画开始篦。

I have a .net winforms app which has a few animation effects, fade ins and scroll animations etc. These work fine however if I'm in a Remote Desktop Protocol session the animations start to grate.

有人建议确定的方式在RDP会话的应用程序是否在运行,所以我可以在这种情况下,关闭的影响了吗?

Can someone suggest a way of determining whether or not an app is running across an RDP session so I can turn the effects off in this case?

推荐答案

假设你至少在.NET Framework 2.0中,有没有必要使用的P / Invoke:只检查系统的价值.Windows.Forms.SystemInformation.TerminalServerSession (<一href="http://msdn.microsoft.com/en-us/library/system.windows.forms.systeminformation.terminalserversession(VS.80).aspx">MSDN).

Assuming you're at least on .NET Framework 2.0, there's no need to use P/Invoke: just check the value of System.Windows.Forms.SystemInformation.TerminalServerSession (MSDN).

这篇关于我如何知道我的应用程序在一个RDP会话中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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