Android Question Detect Current Orientation


Active Member
Licensed User
This sub will assist you to determine the current orientation of your activity.

I noticed that the solutions to this one on the forum are quite complicated or resource intensive. Here is a Sub you can use, which is very simple and uses minimal resources. Hope it helps :) someone.

Sub DetermineCurrentScreenOrientation As String
    Dim orientation As String
    If Activity.Height > Activity.Width Then
        orientation = "portrait"
        orientation = "landscape"
    End If
    Return orientation
End Sub