Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-04-19
4
Medium Priority
?
203 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
  • 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 200 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

971 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