PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
SysScreenOrientation (Function)
In French: SysOrientationEcran
Used to:
  • find out the orientation of the screen on the device (Pocket PC, Android, iOS or Universal Windows 10 App phone).
  • modify the orientation of the screen on the device (Pocket PC or Android phone).
Versions 16 and later
Android This function is now available for the Android applications.
New in version 16
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 17 and later
Universal Windows 10 App This function is now available for the Windows Phone applications.
New in version 17
Universal Windows 10 App This function is now available for the Windows Phone applications.
Universal Windows 10 App This function is now available for the Windows Phone applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Android Widget This function is now available in Android Widget mode.
Versions 19 and later
iPhone/iPad This function is now available for the iPhone/iPad applications. It can only be used to find out the device orientation.
New in version 19
iPhone/iPad This function is now available for the iPhone/iPad applications. It can only be used to find out the device orientation.
iPhone/iPad This function is now available for the iPhone/iPad applications. It can only be used to find out the device orientation.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode. It can only be used to find out the device orientation.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode. It can only be used to find out the device orientation.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode. It can only be used to find out the device orientation.
Example
// Fill the "LIST_Orientations" control with the possibles orientations
ListAdd(LIST_Orientations, SysListScreenOrientation())

// Select the current orientation of the screen in the list
LIST_Orientations = SysScreenOrientation()
// Change the orientation of the screen
// The screen will be turned around
SysScreenOrientation(Orient180)
Syntax

Finding out the screen orientation Hide the details

<Result> = SysScreenOrientation()
<Result>: Character String constant
Value of current screen orientation:
Orient0The screen is oriented in the default direction.
Orient90The screen is turned around by 90° clockwise.
Orient180The screen is turned around by 180°.
Orient270The screen is turned around by 90° anticlockwise (or by 270° clockwise).
AndroidAndroid Widget Windows Mobile

Modifying the screen orientation Hide the details

<Result> = SysScreenOrientation(<Orientation>)
<Result>: Character String constant
Orientation of the screen after the call to the function.
<Orientation>: Character String constant
Indicates the new orientation of the screen:
Orient0The screen is oriented in the default direction.
Orient90The screen is turned around by 90° clockwise.
Orient180The screen is turned around by 180°.
Orient270The screen is turned around by 90° anticlockwise (or by 270° clockwise).
Remarks
  • The change of screen orientation is not supported by all the mobile devices. When this feature is not available, SysScreenOrientation always returns Orient0.
  • Versions 16 and later
    AndroidAndroid Widget The modification of the orientation will affect the current window only.
    New in version 16
    AndroidAndroid Widget The modification of the orientation will affect the current window only.
    AndroidAndroid Widget The modification of the orientation will affect the current window only.
  • Versions 16 and later
    AndroidAndroid Widget Depending on the type of device on which the application is run (phone or tablet), the default orientation (Orient0) can correspond to:
    • the portrait mode (for most of the phones),
    • the landscape mode (for most of the tablets).
    New in version 16
    AndroidAndroid Widget Depending on the type of device on which the application is run (phone or tablet), the default orientation (Orient0) can correspond to:
    • the portrait mode (for most of the phones),
    • the landscape mode (for most of the tablets).
    AndroidAndroid Widget Depending on the type of device on which the application is run (phone or tablet), the default orientation (Orient0) can correspond to:
    • the portrait mode (for most of the phones),
    • the landscape mode (for most of the tablets).
  • Versions 16 and later
    AndroidAndroid Widget To define whether an application is displayed in portrait or landscape mode, we advise you to compare the values returned by SysXRes and SysYRes :
    • if the value returned by SysXRes is less than the value returned by SysYRes, the application is in portrait mode,
    • otherwise, it is in landscape mode.
    New in version 16
    AndroidAndroid Widget To define whether an application is displayed in portrait or landscape mode, we advise you to compare the values returned by SysXRes and SysYRes :
    • if the value returned by SysXRes is less than the value returned by SysYRes, the application is in portrait mode,
    • otherwise, it is in landscape mode.
    AndroidAndroid Widget To define whether an application is displayed in portrait or landscape mode, we advise you to compare the values returned by SysXRes and SysYRes :
    • if the value returned by SysXRes is less than the value returned by SysYRes, the application is in portrait mode,
    • otherwise, it is in landscape mode.
Components
Windows Mobile wp230std.dll
Android wd230android.jar
Minimum required version
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment