I have a TForm and I set the "Position" to poMainFormCenter.
When I open that form, it is displayed correctly in the center of the Main Form.
But, on multiple screens (2 monitors), when I put the application in the secondary monitor, that form is not displayed in the center of the Main Form.
It is displayed still in the primary monitor, positioned in in the edge of the screen.
There is nothing fancy on my app, I only set that Position property.
Anyone know how to fix this?
I am using Delphi 7 and Windows XP SP3.
I was able to workaround this by using the code below on the Form OnActivate:
Self.Left := MainForm.Left + ((MainForm.Width div 2) - (Self.Width div 2)); Self.Top := MainForm.Top + ((MainForm.Height div 2) - (Self.Height div 2));
MainForm is the "main" form of the application.