I was hoping to use the following code to determine whether I was on an iPhone or on an iPad, to determine whether to use an iPhoneLayout or an iPadLayout after I have logged in.
If System.Device.UserInterfaceType = System.Device.UserInterfaceType.Phone Then MessageBox "It's a phone" ElseIf System.Device.UserInterfaceType = System.Device.UserInterfaceType.Tablet Then MessageBox "It's a tablet" End if
But the compile error says that System.Device.UserInterfaceTypes has no member named “Phone” despite auto-completing and being in the Help. I have tried with DeviceData instead of Device and get a different error.
What is the best way to determine if you’re on a phone or tablet?