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.
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.
> 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.
> 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.
> > 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.
> > 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.
> > > 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.
> > > > 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.