Centering a form at the bottom of the screen

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


ST3VOAsked:
Who is Participating?
 
LimbeckCommented:
hi, add this:

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

end;
0
 
mokuleCommented:
 left := (Screen.Width - Width) div 2;
  top := screen.Height - height;
0
 
diniludCommented:
Form1.left:=(Screen.Width-Form1.Width) div 2;
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
diniludCommented:
sorry for my last post.
0
 
ST3VOAuthor Commented:
I'll check it out thanks! :o)
0
 
ziolkoCommented:
if you don't want your form to be on top task bar use:
top := Screen.WorkAreaHeight - Height;

ziolko.
0
 
ST3VOAuthor Commented:
Exactly what I needed. Thanks! :o)
0
 
diniludCommented:
very interesting answer.................... !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.