Tech Tip: Checking if 4D application is in full screen mode
PRODUCT: 4D | VERSION: 15 | PLATFORM: Win
Published On: November 25, 2015
Here is utility method to determine if a 4D application in Windows is in full screen mode:
// --------------------------------------------------------------------------- // Name: CheckAppWindowFullScreen // Description: Method will determine if the 4D application window is in full // screen either in the main screen or extended screen. // // Output: // $0 (LONGINT) - Status of Application Window is full screen. // 0 - Window is not full screen. // 1 - Full screen on main. // 2 - Full screen on extended. // --------------------------------------------------------------------------- C_LONGINT($num_screens;$width) C_LONGINT($left;$top;$right;$bottom) C_LONGINT($leftF;$topF;$rightF;$bottomF) C_LONGINT($0) $num_screens:=Count screens GET WINDOW RECT($leftF;$topF;$rightF;$bottomF;-1) $width:=Screen width $0:=0 // Not full screen For ($i;1;$num_screens) SCREEN COORDINATES($left;$top;$right;$bottom;$i) If (($right=$rightF) & (($bottom=$bottomF)|($left=$leftF))) If ($right=Screen width) $0:=1 // Full screen on Main screen Else $0:=2 // full screen on extended screen End if End if End For |
Example #1 - Full screen on main:

C_LONGINT($status) $status:=CheckAppWindowFullScreen // $status = 1 |
Example #2 - Reduced screen on main:

$status:=CheckAppWindowFullScreen // $status = 0 |
Example #3 - Full screen on extended:

$status:=CheckAppWindowFullScreen // $status = 2 |
Example #4 - Reduced screen on extended:

$status:=CheckAppWindowFullScreen // $status = 0 |