Carpe diem!

Make your lives extraordinary

detecting Terminal server session with c#

SystemInformation.TerminalServerSession Property

Note: This property is new in the .NET Framework version 2.0.

Gets a value indicating whether the calling process is associated with a Terminal Services client session.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

Syntax

Visual Basic (Declaration)
Public Shared ReadOnly Property TerminalServerSession As Boolean

Visual Basic (Usage)
Dim value As Boolean

value = SystemInformation.TerminalServerSession

C#
public static bool TerminalServerSession { get; }

C++
public:
static property bool TerminalServerSession {
	bool get ();
}

J#
/** @property */
public static boolean get_TerminalServerSession ()

JScript
public static function get TerminalServerSession () : boolean

Property Value

true if the calling process is associated with a Terminal Services client session; otherwise, false.

Remarks

The TerminalServerSession property indicates whether the calling process is associated with a Terminal Services client session.

NoteNote
This property is supported only on Windows NT 4.0 SP4 or later, Windows 98, Windows Millennium Edition, Windows 2000, Windows XP, and the Windows Server 2003 family.

May 11, 2009 - Posted by ipans | Blogroll, Ngoprek, code Warior, techno | | No Comments Yet

No comments yet.

Leave a comment