AccessBlog.net

News, links, downloads, tips and tricks on Microsoft Access and related

About Me Search
Alex
Name:Alex Dybenko

Location:Moscow, Russia

Thursday, March 24, 2011

Is your Application Running under Terminal Services?

Below VBA code to check this, IsRunningInTerminal() function returns True when you Access application runs in Terminal server session:

Private Declare Function GetSystemMetrics _
Lib "user32" (ByVal nIndex As Long) As Long

Public Const SM_REMOTESESSION As Long = &H1000

Public
Function IsRunningInTerminal() As Boolean
   IsRunningInTerminal = _
      (GetSystemMetrics(SM_REMOTESESSION) <> 0)
End Function

Labels: , ,

0 Comments:

Post a Comment

<< Home