检测平板电脑

编程入门 行业动态 更新时间:2024-10-27 14:28:15
本文介绍了检测平板电脑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个 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平板电脑-常见问题

更多推荐

检测平板电脑

本文发布于:2023-11-13 01:28:08,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1583035.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:平板   电脑

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!