PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

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


  • Senior Member
  • ***
  • Posts: 369
  • 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:

; 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)
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:

; Edit Form startup pos. and size
top=286 ; correct
left=2105 ; correct
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 »
Clive Richey
*“You Either Have To Be Part Of The Solution, Or You’re Going To Be Part The Problem.” Eldridge Cleaver.
#StaySafe, Always  Keep A Safe #SocialDistance, #WashYourHands Often and please, #StayHome!