Solved

Position a window at run-time in relation to its parent (not ownercentre etc)

Posted on 2004-04-19
4
198 Views
Last Modified: 2010-04-05
I have a very small window that gets created when its parent does, but I dont want it to sit in the middle of its parent, but down in the bottom left corner of the parents window.  How can I determine the screen position it should go to (assuming I know the width of the 2 windows and the start position of the parent)
0
Comment
Question by:mikelittlewood
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 17

Expert Comment

by:mokule
ID: 10858402
Left := 0;
Top := Parent.Height-Height;
0
 
LVL 12

Accepted Solution

by:
Ivanov_G earned 50 total points
ID: 10858432

  procedure TForm2.FormShow(Sender: TObject);
  begin
    Left := Form1.Left;
    Top  := (Form1.Top + Form1.Height) - Height;
  end;
0
 
LVL 15

Author Comment

by:mikelittlewood
ID: 10858530
Thanks all ...

I got it working using the second solution.
For some reason using "Parent.<>" just keeps throwing up errors
0
 
LVL 17

Expert Comment

by:mokule
ID: 10858613
Sure it throws errors. I've thought that You change it by what is really parent.
BTW
It seems that You haven't Parent/Child relationship if the second solution works ok.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question