Detecting tablet PC

前端 未结 3 614
故里飘歌
故里飘歌 2021-01-03 10:15

I have a .net 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 t

3条回答
  •  [愿得一人]
    2021-01-03 10:27

    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.

    For web development, you should read the USER_AGENT_STRING environment variable. You can access this Request.ServerVariables collection.

    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.

    Sources

    Determining Whether a PC is a Tablet PC

    MSDN Windows Tablet - Frequently Asked Questions

提交回复
热议问题