Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Determining if application is running on XP Tablet PC edition
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Expand all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ryan McFall  
View profile  
 More options Jul 9 2004, 2:31 pm
Newsgroups: microsoft.public.windows.tabletpc.developer
From: "Ryan McFall" <mcf...@Hope.edu>
Date: Fri, 9 Jul 2004 14:31:50 -0400
Local: Fri, Jul 9 2004 2:31 pm
Subject: Determining if application is running on XP Tablet PC edition
Hi:

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fritz Switzer  
View profile  
 More options Jul 9 2004, 2:58 pm
Newsgroups: microsoft.public.windows.tabletpc.developer
From: "Fritz Switzer" <fritz.swit...@abletfactory.com>
Date: Fri, 9 Jul 2004 13:58:50 -0500
Local: Fri, Jul 9 2004 2:58 pm
Subject: Re: Determining if application is running on XP Tablet PC edition
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:%23EW0BMeZEHA.3420@TK2MSFTNGP12.phx.gbl...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ryan McFall  
View profile  
 More options Jul 13 2004, 7:25 am
Newsgroups: microsoft.public.windows.tabletpc.developer
From: "Ryan McFall" <mcf...@Hope.edu>
Date: Tue, 13 Jul 2004 07:25:12 -0400
Local: Tues, Jul 13 2004 7:25 am
Subject: Re: Determining if application is running on XP Tablet PC edition
Thanks, Fritz, that did the trick.

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.swit...@abletfactory.com> wrote in message

news:O5h9KbeZEHA.212@TK2MSFTNGP12.phx.gbl...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fritz Switzer  
View profile  
 More options Jul 13 2004, 10:15 am
Newsgroups: microsoft.public.windows.tabletpc.developer
From: "Fritz Switzer" <fritz.swit...@abletfactory.com>
Date: Tue, 13 Jul 2004 09:15:59 -0500
Local: Tues, Jul 13 2004 10:15 am
Subject: Re: Determining if application is running on XP Tablet PC edition
Ryan,

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:egDBTwMaEHA.2632@TK2MSFTNGP10.phx.gbl...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Teal  
View profile  
 More options Jul 27 2004, 5:21 pm
Newsgroups: microsoft.public.windows.tabletpc.developer
From: Mark Teal <MarkT...@discussions.microsoft.com>
Date: Tue, 27 Jul 2004 14:21:05 -0700
Local: Tues, Jul 27 2004 5:21 pm
Subject: Re: Determining if application is running on XP Tablet PC edition
Thought I'd add the VB.Net translation for that code (for those of us using VB.Net to develop our Tablet PC applications):

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »