B4J Question [B4J]: Issue Saving/Setting Window P0sition

MrKim

Well-Known Member
Licensed User
Longtime User
Edit: This is using TWO using two monitors.
Edit2: This was my not understanding the code nothing to see here...
??

Windows does not locate open screens correctly. Refer to this page .
In this case the main screen is on the RIGHT, Secondary screen on the left.
It appears that if the number goes to far negative then it thinks it is the MAIN screen and locates it incorrectly.

NOTE THIS IS on my computer with both monitors set at 1920x1080.
This problem came up on a CUSTOMERS computer with much HIGHER RESOLUTION. For him he did NOT have to move the window partially OFF Screen as I did. For him the window was still fully on the left hand screen but opened up back on the right.

I have the same issue if I put the second screen on the RIGHT instead of the left, but it requires moving the window almost all the way off the screen.

This is the Setting I am using to both save and restore:
1650862818921.png


As always, any insights greatly appreciated.

This Opens Correctly:
'SAVED'
MachinesFrm.WindowLeft Open Saved Setting -2235.199951171875
MachinesFrm.WindowLeft Open Set -2235.199951171875
'OPEN
screen 1 MinX/MaxX Open Setting: 0.0/1536.0
screen 1 MinY/MaxY Open Setting: 0.0/864.0
screen 2 MinX/MaxX Open Setting: -1536.0/0.0
screen 2 MinY/MaxY Open Setting: 0.0/864.0
Saves Here:
ImageGoodSave.png

Opens Here (correctly):
ImageGoodRestore.png


This Does not::
'SAVED
MachinesFrm.WindowLeft Open Saved Setting -2461.60009765625
MachinesFrm.WindowLeft Open Set -2461.60009765625
'OPEN
screen 1 MinX/MaxX Open Setting: 0.0/1536.0
screen 1 MinY/MaxY Open Setting: 0.0/864.0
screen 2 MinX/MaxX Open Setting: -1536.0/0.0
screen 2 MinY/MaxY Open Setting: 0.0/864.0
'
Saved her:
1650860591443.png


Opens Here:
1650860380257.png
 
Last edited:
Top