Remote Desktop

How to Check If .NET Core Program is Running under Remote Desktop

There are a few reasons that we need to know if our program is running under the Windows Remote Desktop (RDP) session. For example, if it is running under RDP, we may disable animation and other fancy graphics effects. But how can we detect if our program is currently under RDP? Let's see. Windows Forms If you are developing Windows Forms Apps using .NET Core 3.x, there's a built-in API that can …

.NET Core RDP Remote Desktop P-Invoke Win32

  • 1