I\'m using the following code to detect if a user is in tablet mode or not. I\'m on a Surface Pro and when I decouple the keyboard and make the PC into a tablet, IsTab
Edit 2: The SM_TABLETPC is only supported by Windows XP Tablet PC Edition and Windows Vista. There doesn't seem to be any reference to Windows 10 here: https://msdn.microsoft.com/en-us/library/windows/desktop/ms700675(v=vs.85).aspx
You can use this: GetSystemMetrics(SM_CONVERTIBLESLATEMODE). A “0” returned means it is in tablet mode. A “1” returned means it is in non-tablet mode. https://software.intel.com/en-us/articles/how-to-write-a-2-in-1-aware-application
Can you replace the QueryTabletMode method with this:
private static Boolean QueryTabletMode ()
{
int state = GetSystemMetrics(SM_CONVERTIBLESLATEMODE);
return (state == 0);
}
Edit: You might need to check this periodically as there's no event to see if the PC's tablet mode was turned on