Private pg As Page ' define in Process_Globals
Sub pg_Resize(Width As Int, Height As Int) 'As String
Dim orientation As String = ""
If Width > Height Then
orientation = "Landscape"
SetOrientation(True)
Else
orientation = "Portrait"
SetOrientation(False)
End If
Log(orientation)
'Return orientation
End Sub
Sub SetOrientation(landscape As Boolean)
Dim no As NativeObject
Dim value As Int
If landscape Then value = 1 Else value = 1
no.Initialize("UIDevice").RunMethod("currentDevice", Null).SetField("orientation", value)
End Sub