Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Centering a form at the bottom of the screen

Posted on 2007-07-26
8
Medium Priority
?
225 Views
Last Modified: 2010-04-05
Hi all,

I've got an issue here trying to align a form.

I don't want to use align AlBottom and the form is not the whole size the the form behind it.

It's currently and the bottom of the screen but I need it to be centered.

Any ideas of how I could do that please?

Thanks

- ST3VO


0
Comment
Question by:ST3VO
8 Comments
 
LVL 17

Expert Comment

by:mokule
ID: 19573234
 left := (Screen.Width - Width) div 2;
  top := screen.Height - height;
0
 
LVL 10

Expert Comment

by:dinilud
ID: 19573238
Form1.left:=(Screen.Width-Form1.Width) div 2;
0
 
LVL 10

Expert Comment

by:dinilud
ID: 19573241
sorry for my last post.
0
Industry Leaders: 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!

 
LVL 19

Accepted Solution

by:
Limbeck earned 2000 total points
ID: 19573247
hi, add this:

procedure TForm1.FormCreate(Sender: TObject);
begin
  left:=trunc((screen.Width-width)/2);

end;
0
 

Author Comment

by:ST3VO
ID: 19573314
I'll check it out thanks! :o)
0
 
LVL 21

Expert Comment

by:ziolko
ID: 19573536
if you don't want your form to be on top task bar use:
top := Screen.WorkAreaHeight - Height;

ziolko.
0
 

Author Comment

by:ST3VO
ID: 19573746
Exactly what I needed. Thanks! :o)
0
 
LVL 10

Expert Comment

by:dinilud
ID: 19573860
very interesting answer.................... !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
Integration Management Part 2
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

564 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