Chris Bishop
Posts: 13
Joined: 2016-01-25
|
Hi,
I am having trouble figuring this out. How would I go about centring a form to an active workbook?
I was thinking of getting the LEFT / TOP / WIDTH / HEIGHT of the active workbook and moving the form. Is there a better way using Delphi? |
|
Andrei Smolin
Add-in Express team
Posts: 18816
Joined: 2006-05-11
|
Hello Chris,
If you show your TForm modally, it should center itself if TForm.Position set to poOwnerFormCenter. If you chow it non-modally, set TForm.Position to poDefault, call GetActiveWindow() and calculate the position.
Andrei Smolin
Add-in Express Team Leader |
|