Topic: Form position

I think this question has been asked before but I can't find the answer. So, is it possible to define the screen position of a second or third form in relation to Form1. For example I need to have Form2 when shown, in the bottom left hand side of Form1 so that the data (on Form1) is still visible. Any help greatly appreciated.

Re: Form position

It's possible.


1. Set property Position = poDesigned for Form2


2. Script for button with action ShowForm:

procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
begin
    Form2.Left := Form1.Left - Form2.Width;
    Form2.Top := Form1.Top + Form1.Height;
end;
Dmitry.

Re: Form position

Never thought about that.


This is clever !!


Thanks for the tip


Mathias

I'm a very good housekeeper !
Each time I get a divorce, I keep the house

Zaza Gabor

Re: Form position

What about multi monitors use situation?


App always opens on default monitor. This, I like as monitors count can change you still get it on the default monitor.


However, let say in two monitor situation, if I move the app from default monitor [1] to second monitor [2];
is it possible to make app  to open sub forms on second monitor too?

Adam
God... please help me become the person my dog thinks I am.

Re: Form position

AD1408 wrote:

What about multi monitors use situation?


App always opens on default monitor. This, I like as monitors count can change you still get it on the default monitor.


However, let say in two monitor situation, if I move the app from default monitor [1] to second monitor [2];
is it possible to make app  to open sub forms on second monitor too?

Please download latest version
https://www.dropbox.com/s/4sb2tk75rauoj … b.zip?dl=0


For all child forms set property Position = poMainFormCenter

Dmitry.