Jeff,
According to the Microsoft Tablet PC SDK:
<quote>
Q. How can I determine if my application is running on a Tablet PC?
A. Use the Windows GetSystemMetrics API and pass in SM_TABLETPC as the value
of the index. SM_TABLETPC is defined in Winuser.h. The value of SM_TABLETPC
is 86. The method returns True or nonzero if the Microsoft Windows XP Tablet
PC Edition operating system is running; False or zero otherwise.
Applications should not rely on a true or nonzero value to mean all Tablet
PC components are installed and working. See the following question for
details on how to determine if Tablet PC components are installed.
</quote>
There is also a MediaCenter system metrics value.
I would expect System.Windows.Forms.SystemInformation would list both values
as it gives most other SystemMetrics, however it appears to be missing
TabletPC (SM_TABLETPC) & MediaCenter (SM_MEDIACENTER).
You can use code similar to:
Public Enum SystemMetric As Integer
TabletPC = 86
MediaCenter = 87
End Enum
Declare Auto Function GetSystemMetrics Lib "User32" (ByVal index As
SystemMetric) As Integer
If GetSystemMetrics(SystemMetric.TabletPC) <> 0 Then
Debug.WriteLine("On a Tablet PC")
Else
Debug.WriteLine("Not on a Tablet PC")
End If
If GetSystemMetrics(SystemMetric.MediaCenter ) <> 0 Then
Debug.WriteLine("On a Media Center PC")
Else
Debug.WriteLine("Not on a Media Center PC")
End If
I've used the Tablet PC value reliably, I don't have a Media Center PC to
verify the Media Center value.
I'm not sure how to tell the difference between Home & Pro.
Hope this helps
Jay
"Jeff Johnson [MVP: VB]" <i.***@enough.spam> wrote in message
news:Ol**************@tk2msftngp13.phx.gbl...
"Siv" <gs@remove.sivill.com> wrote in message
news:OT*************@TK2MSFTNGP11.phx.gbl...
It did work brilliantly, thanks Gerry.
For completeness, people have asked in the past if it's possible to
distinguish between different "flavors" of XP, like Home, Pro, Tablet, and
Media Center. I haven't seen a satisfactory solution to that one yet.