有没有办法以编程方式判断系统是否启用了触摸?

Is there a way to programmatically tell if a system is touch enabled?(有没有办法以编程方式判断系统是否启用了触摸?)
本文介绍了有没有办法以编程方式判断系统是否启用了触摸?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图弄清楚如何以编程方式判断 Windows 7 机器是否启用了触控.是否有任何触摸 API(托管或非托管)可以帮助我实现这一目标?或者也许我可以检查注册表中的某些内容?

I'm trying to figure out how to programmatically tell if a Windows 7 machine has touch enabled. Are there any touch API's (managed or unmanaged) that can help me achieve this? Or perhaps something in the registry I can check?

推荐答案

使用GetSystemMetrics 以查找 SM_MAXIMUMTOUCHES 设置.

如果有数字转换器,则非零系统;否则,0.

Nonzero if there are digitizers in the system; otherwise, 0.

SM_MAXIMUMTOUCHES 返回最大值的合计最大值每个支持的联系人数量系统中的数字化仪.如果系统只有单点触控数字化仪,返回值为 1.如果系统有多点触控数字化仪,回归值是同时的数量硬件可以提供的联系方式.

SM_MAXIMUMTOUCHES returns the aggregate maximum of the maximum number of contacts supported by every digitizer in the system. If the system has only single-touch digitizers, the return value is 1. If the system has multi-touch digitizers, the return value is the number of simultaneous contacts the hardware can provide.

这篇关于有没有办法以编程方式判断系统是否启用了触摸?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

DispatcherQueue null when trying to update Ui property in ViewModel(尝试更新ViewModel中的Ui属性时DispatcherQueue为空)
Drawing over all windows on multiple monitors(在多个监视器上绘制所有窗口)
Programmatically show the desktop(以编程方式显示桌面)
c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
LINQ many-to-many relationship, how to write a correct WHERE clause?(LINQ多对多关系,如何写一个正确的WHERE子句?)