Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi Erkennung TabletModus Windows 10 (https://www.delphipraxis.net/188379-erkennung-tabletmodus-windows-10-a.html)

ULIK 26. Feb 2016 08:19

Erkennung TabletModus Windows 10
 
Frage: kennt jemand einen Weg, um via Win32 API herauszufinden, ob unter Windows 10 der Tabletmodus aktiv ist oder nicht? Bzw. dann auch weitergehend, ob die Anwendung in einen Teilbereich eingedockt ist (bei aktivem Tabletmodus).

Was ich bisher rausgefunden habe: wenn man den Tabletmodus (de-)/aktiviert, so wird eine WM_SETTINGCHANGE Message geschickt. In dieser hat dann die Section den Wert 'UserInteractionMode'. So weit so gut, nur liefert dies keine Information, ob der Modus nun an oder aus ist.

Hintergrund der Geschichte: abhängig ob Tabletmodus aktiv ist oder nicht, sollen bestimmte Funktionalitäten im Programm angepaßt werden (z.B. bei aktivem Tabletmodus das Umschalten in einen Fullscreen-Modus verhindert werden, speziell, wenn die Anwendung in einen Teilbereich eingedockt ist).


Danke,
Uli

Assarbad 6. Sep 2016 10:06

AW: Erkennung TabletModus Windows 10
 
Suchst du vielleicht MSDN-Library durchsuchenGetSystemMetrics mit dem Flag MSDN-Library durchsuchenSM_DIGITIZER bzw. MSDN-Library durchsuchenSM_TABLETPC? Zitat zu den Flags:

Zitat:

Nonzero if the current operating system is Windows 7 or Windows Server 2008 R2 and the Tablet PC Input service is started; otherwise, 0. The return value is a bitmask that specifies the type of digitizer input supported by the device.
Zitat:

Nonzero if the current operating system is the Windows XP Tablet PC edition or if the current operating system is Windows Vista or Windows 7 and the Tablet PC Input service is started; otherwise, 0. The SM_DIGITIZER setting indicates the type of digitizer input supported by a device running Windows 7 or Windows Server 2008 R2.
Laß dich mal nicht verunsichern von der expliziten Erwähnung von Windows 7 und 2008 R2. Probieren geht über studieren.

MSDN-Library durchsuchenSM_CONVERTIBLESLATEMODE und MSDN-Library durchsuchenSM_SYSTEMDOCKED könnten ebenfalls von Interesse sein.

Der schöne Günther 6. Sep 2016 10:29

AW: Erkennung TabletModus Windows 10
 
Scheint keine andere Möglichkeit zu geben als das in der Registry nachzuschlagen. Die Windows-Message teilt tatsächlich nur mit dass es sich geändert hat, nicht was es nun ist.

https://social.msdn.microsoft.com/Fo...suidevelopment

https://software.intel.com/en-us/art...convertible-pc


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:22 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz