Solved

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

Posted on 2004-04-19
4
186 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
Comment Utility
Left := 0;
Top := Parent.Height-Height;
0
 
LVL 12

Accepted Solution

by:
Ivanov_G earned 50 total points
Comment Utility

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

Author Comment

by:mikelittlewood
Comment Utility
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
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now