473,388 Members | 1,220 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Using GetSystemMetrics(SM_REMOTESESSION) in VB.Net

Hi,
Can you please let me know the code in VB.Net for how to use
GetSystemMetrics(SM_REMOTESESSION) to know if the application is running on
Terminal Server or on local machine.

Thanks

Mar 4 '06 #1
2 5886
"Hitesh" <Hi****@discussions.microsoft.com> schrieb:
Can you please let me know the code in VB.Net for how to use
GetSystemMetrics(SM_REMOTESESSION) to know if the application is running
on
Terminal Server or on local machine.


\\\
Private Declare Function GetSystemMetrics Lib "user32.dll" ( _
ByVal nIndex As Int32 _
) As Int32

Private Const SM_REMOTESESSION As Int32 = &H1000
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Mar 4 '06 #2
Hi,

Take a look at Systeminformation.terminalserversession

http://msdn2.microsoft.com/en-us/lib...ersession.aspx

Ken
--------------------------
"Hitesh" <Hi****@discussions.microsoft.com> wrote in message
news:DF**********************************@microsof t.com...
Hi,
Can you please let me know the code in VB.Net for how to use
GetSystemMetrics(SM_REMOTESESSION) to know if the application is running
on
Terminal Server or on local machine.

Thanks

Mar 4 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Oenone | last post by:
Is it possible to detect whether my application is running within a Terminal Server session or not? I'd like to automatically switch off some of my graphics rendering under this environment as...
7
by: Nikolay Petrov | last post by:
Can anyone convert some C code to VB .NET for me? Thanks in advance!! #define LOGONID_CURRENT ((ULONG)-1) #define SERVERNAME_CURRENT ((HANDLE)NULL) typedef enum _WINSTATIONINFOCLASS...
1
by: Hitesh | last post by:
Hi, I need code in VB.Net to detect if the application is running on Terminal Server. I am using the following code. Please let me know if you see any issues in it or if you have some better code...
2
by: Hitesh | last post by:
Hi, I need code in VB.Net to detect if the application is running on Terminal Server. I am using the following code. Please let me know if you see any issues in it or if you have some better code...
1
by: Hitesh | last post by:
Hi, Can you please let me know the code in VB.Net for how to use GetSystemMetrics(SM_REMOTESESSION) to know if the application is running on Terminal Server or on local machine. Thanks
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.