Sub SetScreenOrientation(LandScape As Boolean, Reverse As Boolean)
'ReverseLandscape (8) and ReversePortrait (9)
Dim MyPhone As Phone
If LandScape = False Then
If Reverse = False Then
MyPhone.SetScreenOrientation(1) 'portrait
Else
MyPhone.SetScreenOrientation(9) 'portrait
End If
Else
If Reverse = False Then
MyPhone.SetScreenOrientation(0)
Else
MyPhone.SetScreenOrientation(8)
End If
End If
End Sub