Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
You may occasionally need to determine whether your application is running on a Tablet PC because you may want your applications to take advantage of inherent ink, recognition, and pen capabilities. To help you determine whether your application has access to the Tablet PC features, you can use the GetSystemMetrics() Windows API call as described in this topic.
You can use the following techniques to determine whether your code is running on a Tablet PC.
In Microsoft Windows XP Tablet PC Edition, use the GetSystemMetrics(SM_TABLETPC) function to determine whether a computer is a Tablet PC. GetSystemMetrics(SM_TABLETPC) is designed to return TRUE on a computer running Windows XP Tablet PC Edition.
In Windows Vista, there is no longer a distinct Tablet PC SDK. The Windows SDK now contains a section called "Tablet PC and Touch Technology" and the logic of GetSystemMetrics(SM_TABLETPC) has been changed to reflect this. GetSystemMetrics(SM_TABLETPC) now returns true if all of the following are true:
With this increased accuracy, GetSystemMetrics(SM_TABLETPC) continues to be the recommended way to determine whether a computer running Windows Vista is a Tablet PC.
In both Windows XP Tablet PC Edition and Windows Vista, you can search for the presence of the ink binaries—such as inkobj.dll and Microsoft.Ink.dll—and use their supported functionality if they are present.
In Windows Vista, the Tablet PC Platform binaries are installed on all client versions by default. Input and inking functionality are available on those versions. Recognition is available only in premium versions of Windows Vista.
In Windows Vista, the user-agent string reported by Internet Explorer includes "Tablet PC 2.0" if, according to GetSystemMetrics(SM_TABLETPC), the device is a Tablet PC.
In Windows XP Tablet PC Edition 2005, the user-agent string includes Tablet PC 1.7. The user-agent string looks something like the following:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; Tablet PC 2.0)
Use this value to determine whether the client computer is a Tablet PC and supports Web-based inking controls.
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today