ScreenOrientation property
Use this property to set and retrieve if the device is portrait or landscape
Syntax
ScreenOrientation value; // give relevant initial value
obj.ScreenOrientation = value;
value = obj.ScreenOrientation
Type:ScreenOrientation