Does anyone know of a way to determine whether an application (in this case
C#.NET) is running under the XP Tablet PC edition? I've tried using the
information returned from System.Environment.OSVersion, but both the Version
and Platform properties seem to return the same thing on XP Pro and Tablet
PC edition.
I've thought of looking for the inking DLL's, and if they exist using calls
to enumerate the tablet devices, but that seems like more trouble than it's
worth.
Thanks for any help,
Ryan
Import User32.dll and then call GetSystemMetrics with the value '86'.
const int SM_TABLETPC = 86;
[DllImport("user32.dll")]
private static extern int GetSystemMetrics(int nIndex);
private void btnIsTablet_Click(object sender, System.EventArgs e)
{
if (GetSystemMetrics(SM_TABLETPC) != 0)
MessageBox.Show("Yes, this IS a tablet");
else
MessageBox.Show("No, this IS NOT a tablet");
}
Make sure you add "using System.Runtime.InteropServices;"
Additional notes can be found in the SDK like creating recognizer
instances, etc.
Hope this helps,
Fritz
--
Fritz Switzer
Microsoft MVP Tablet PC
www.abletfactory.com
"Ryan McFall" <mcf...@Hope.edu> wrote in message
news:%23EW0BMe...@TK2MSFTNGP12.phx.gbl...
That's twice now recently that I've looked in all the documentation I can
think of before posting, and have missed the obvious one!
Ryan
"Fritz Switzer" <fritz....@abletfactory.com> wrote in message
news:O5h9Kbe...@TK2MSFTNGP12.phx.gbl...
Well, this one is a bit off the path. I think I came across it in the
Tablet FAQ or somewhere like that.
Glad it helped,
Fritz
--
Fritz Switzer
Microsoft MVP Tablet PC
www.abletfactory.com
"Ryan McFall" <mcf...@Hope.edu> wrote in message
news:egDBTwMa...@TK2MSFTNGP10.phx.gbl...
Imports System.Runtime.InteropServices
Declare Auto Function GetSystemMetrics Lib "user32" (ByVal nIndex As Integer) As Integer
Private Const SM_TABLETPC As Integer = 86
If GetSystemMetrics(SM_TABLETPC) <> 0 Then
msgbox("Yes, this IS a tablet")
Else
msgbox("No, this IS NOT a tablet")
End If
--
Mark Teal
www.bodytrans.com