PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: WinFBE 2.0.3 - Form  (Read 106 times)

SeaVipe

  • Senior Member
  • ***
  • Posts: 294
  • Windows 10
WinFBE 2.0.3 - Form
« on: February 13, 2020, 03:54:30 PM »

Hi Paul, To show a sub form modal I'm using the following:
Code: [Select]
frmJedit.ShowDialog( frmMainj.hWindow )My development machine has 2 monitors. Monitor #1 is the work monitor. frmMainj (the main form) of my WinFBE app is shown on monitor #2.
A sub form (frmJedit) is used to edit the values of a ListView on frmMainj.
On form Closing, the position of the sub form is saved to an ini file so that the sub form is positioned the same the next time it is shown.
However, the saved position is off screen Like so:
Quote

[Jeditor]
; Edit Form startup pos. and size
top=-86 ; off screen
left=-1920 ; off screen and it is the negative value of the main form's left (1920)
Height=509
Width=597
To solve this issue I have to show the sub form modeless
Code: [Select]
frmJedit.ShowWhich results in the following ini file values when the sub form is closing:
Quote

[Jeditor]
; Edit Form startup pos. and size
top=286 ; correct
left=2105 ; correct
Height=509
Width=597
Using Visual Designer, I've tried many different settings on both the main form and the sub form but the result is much the same.

UPDATE. Changed code to force the sub form to be centred over the parent form. ;0)
« Last Edit: February 13, 2020, 05:37:41 PM by SeaVipe »
Logged
Clive Richey
There is nothing government can give you that it hasn't already taken from you in the first place. Winston Churchill