Jump to content
Sign in to follow this  

How to detrmine if running Tablet PC version of XP?

Recommended Posts


I need to determine if a machine is running the TabletPC version of Windows XP.

The AUtoIt macros just report Windows XP.

I came across a solution which requires linking to a DLL file. I have no experience whatsoever with it.

I have installed the newest AutoIt beta because I know it is able to link to DLL files but I don't know what to do with ti :lmao:

Here is the C++ code. WOuld anyone be able to port this to Autoit code? Thanks!

Here is what I found online:

Import User32.dll and then call GetSystemMetrics with the value '86'.

const int SM_TABLETPC = 86; 
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"); 
  MessageBox.Show("No, this IS NOT a tablet"); 

Make sure you add "using System.Runtime.InteropServices;"

Share this post

Link to post
Share on other sites

OK, I think figured it out :lmao:

Dim $result
Const $TabletPC = 86

$result = DllCall ( 'user32.dll', 'int', 'GetSystemMetrics', 'int', $TabletPC )

If $result[0] = 1 Then
    MsgBox ( 0, 'Debug', 'TabletPC!' )
    MsgBox ( 0, 'Debug', 'NOT TabletPC!' )

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.