Window users are experiencing dancing and flickering of FOCUS windows.
In large part the culprits are MS Windows and the way FMPro GUI has been implemented. So, many times, windows that are [maximized] suddenly reduce their size because FOCUS opens an out-of-screen window in order to add/delete records.
Window's behaviour is different between Mac and PCs and this is a very annoying situation; so I've imagined a solution to the problem that was minimal invasive. In other words: easy to implement and non-destructive (I hate rewriting all my script because a revised API...
As result of the rewriting these three basic scripts need some changes: (a) "o open" , (b) ". initialize window" and (c) ". adjust window for platform". You have to add two very little CFs too: MaxWidth and MaxHeight.
The modded scripts are:
o open"
Three step-scripts added at the very first rows of script
Show/Hide Status Area [Lock; Hide]
Show/Hide Text Ruler [Hide]
Adjust Window [Resize to fit]
. initialize window
One step-script added and one removed :
Perform Script [". adjust window for platform (-maximize)"] (added)
Adjust Window [Resize to Fit] (to be removed)
. adjust window for platform (-maximize)
Assuming the developer always wants [Adjust to Fit] the window "à la Mac", I've added theparameter -maximize (the sign minus means the parameter is "optional".
The syntax is very easy: if you want "maximize" the window set that parameter equals to TRUE! Example: . adjust window for platform [ # ( "maximize" ; TRUE ) ]
# Declare variables
Set Variablee [$_maximize:#P("maximize")]
#
#Check platform and adjust window accordingly
If [ Abs ( Get(systemPlatform)) = 1 ]
Adjust Window [Resize to Fit]
Else
If [$_maximize=TRUE]
Adjust Window [Maximize]
Else
Move/Resize Window [Current Window; MaxHeight; Width: MaxWidth; Top: 0; Left: 0 ]
End If
End If
Exit Script (Result:ResultSuccess)
The following two Custom Functions are useful when the current system platform is MS Windows!
MaxWidth()
Calculation: Get(DesktopWindowWidth) - 4
MaxHeight()
Calculation: Get(DesktopWindowHeight) - 4
Well, I hope this may help everybody.
Warning: "Do not be too much confident with this mod; my tests lasted 15 minutes!"
/Stefano
http://web.ticino.com/itc-didag
--------------------------------------
Attachment: three PDFs
.pdf.png)


Comments