我有一个 winforms应用程序,某些用户将在Win7平板电脑上运行。对于这些用户,我想更改某些UI元素以简化笔输入,同时将这些项目留给普通用户使用。我已经找到有关Pen& Pen设计指南的msdn文档。触摸,以及在电子墨水等上的坚韧不拔,但仅检测到此机器是否支持手写笔或触摸就什么也没有。有任何提示吗?
I have a winforms application which some users will run on Win7 tablets. For those users, I want to change certain UI elements to make pen input easier, while leaving those items alone for regular users. I've been able to find msdn docs on design guidelines for pen & touch, and nitty gritty on e-ink and such, but nothing on just detecting "Does this machine support a stylus or touch". Any hints?
推荐答案A。使用Windows GetSystemMetricsAPI并传入SM_TABLETPC作为索引值。在Winuser.h中定义了SM_TABLETPC。 SM_TABLETPC的值为86。
A. Use the Windows GetSystemMetricsAPI and pass in SM_TABLETPC as the value of the index. SM_TABLETPC is defined in Winuser.h. The value of SM_TABLETPC is 86.
对于Web开发,您应该阅读USER_AGENT_STRING环境变量。您可以访问此Request.ServerVariables集合。
For web development, you should read the USER_AGENT_STRING environment variable. You can access this Request.ServerVariables collection.
有关如何在运行Windows Vista或Windows XP Tablet PC Edition的Tablet PC上使用GetSystemMetrics的详细信息,请参阅确定是否PC是平板电脑。
For details of how to use GetSystemMetrics on Tablet PCs running either Windows Vista or Windows XP Tablet PC Edition, refer to Determining Whether a PC is a Tablet PC.
来源
确定PC是否为平板电脑
MSDN Windows平板电脑-常见问题
更多推荐
检测平板电脑
发布评论