Try Screen.ActiveForm.

-----Original Message-----
From: Mike Osborne [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 24 April 2001 13:01
To: Multiple recipients of list delphi
Subject: [DUG]: New Tack - basic question


I put the following code into a form that can be created from many different
forms so that it shows up centered inside the
form from which the create originated.

procedure TfrmNotes.FormShow(Sender: TObject);
var
    T,L,H,W : integer;
begin
  with ???????? do begin
       T := Top;
       L := Left;
       H := Height;
       W := Width;
  end;
  Top := T + (H div 2) - Height div 2;
  Left := L + (W Div 2) - Width div 2;
end;

Is there a generic entry I can replace the ?????????? with that identifies
the form from which the create originated?

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"



CAUTION - This message may contain privileged and confidential information intended 
only for the 
use of the addressee(s) named above.  If you are not the intended recipient of this 
message you are 
hereby notified that any use, dissemination, distribution or reproduction of this 
message is prohibited.  
If you have received this message in error please notify Progressive Enterprises Ltd. 
immediately via 
email at [EMAIL PROTECTED]  Any views expressed in this message 
are those of the 
individual sender and may not necessarily reflect the views of Progressive Enterprises 
Ltd.

This footnote also confirms that Progressive Enterprises Ltd. has swept this email 
message for the 
presence of computer viruses.  This does not guarantee this message is virus free.

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to